Zen
A cross-platform functional programming language

GrammarStatement Class Reference

AST node base class representing a single EBNF grammar statement. More...

#include <Ast.hpp>

Inheritance diagram for GrammarStatement:
Node GrammarRuleStatement LexerStatement

List of all members.

Classes

class  Visitor
 GrammarStatement Visitor interface class. More...

Public Member Functions

const z::stringgetName () const
 Returns the name of this statement.
const FunctionDefgetFunctionDef () const
 Returns the function definition of this statement.
const FunctionBlockgetBlock () const
 Returns the function block of this statement.
virtual void visit (GrammarStatement::Visitor &visitor) const =0
 Visitor pattern implementation.

Protected Member Functions

 GrammarStatement (const z::string &name, const Ast::FunctionDef &fdef, const Ast::FunctionBlock &fblock)
 Default constructor.

Private Attributes

const z::string _name
 Name of this statement.
const Ast::FunctionDef_fdef
 Function definition of this statement.
const Ast::FunctionBlock_fblock
 Function block of this statement.

Detailed Description

AST node base class representing a single EBNF grammar statement.


Constructor & Destructor Documentation

GrammarStatement ( const z::string name,
const Ast::FunctionDef fdef,
const Ast::FunctionBlock fblock 
) [inline, protected]

Default constructor.

Parameters:
nameName of the variable on the LHS of the grammar statement
fdefDefinition of the function that represents this statement
fblockFunction block of the action function for this statement

Member Function Documentation

const FunctionBlock& getBlock ( ) const [inline]

Returns the function block of this statement.

Returns:
Function block of this statement
const FunctionDef& getFunctionDef ( ) const [inline]

Returns the function definition of this statement.

Returns:
Function definition of this statement
const z::string& getName ( ) const [inline]

Returns the name of this statement.

Returns:
Name of this statement
virtual void visit ( GrammarStatement::Visitor visitor) const [pure virtual]

Visitor pattern implementation.

Parameters:
visitorThe visitor object.

Implemented in GrammarRuleStatement, and LexerStatement.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines