Index

SymbolInfo Class Reference

This class provides information about a symbol in a rule. More...

#include "gsp__Symbol.h"


Public Functions

Protected Functions

Private Functions

Private Variables

Public Static Variables

Friends


Detailed Description

This class provides information about a symbol in a rule. For example, it tells whether the symbol is a constant, a token or a non-terminal.

Instances of this class can be obtained using a SymbolInfoCursor object.

Users can't construct by themselves SymbolInfo objects, but have to get them using SymbolInfoCursor objects.


Functions Documentation

SymbolInfo ( const LLParser & parser   [  private  ] 

Constructor for an object containing an invalid information.

Useful when attempting to navigate outside the valid range of symbols in a rule, in which case an invalid symbol is returned.

Private.

See also:

Back to index

SymbolInfo ( unsigned long uSymbolDescription , const LLParser & parser   [  private  ] 

Constructor for an object containing a valid symbol information. The description of the symbol as coded by the generator must be passed to the constructor.

Useful when attempting to navigate outside the valid range of symbols in a rule, in which case an invalid symbol is returned.

Private.

See also:

Back to index

SymbolInfo ( const SymbolInfo & si 

Copy constructor.

Private.

See also:

Back to index

~SymbolInfo ( )   [  virtual  ] 

Destructor.

See also:

Back to index

bool isValid ( ) const 

Tells whether the symbol information is valid.

See also:

Back to index

bool isNonTerminal ( ) const 

Tells whether the symbol is a non-terminal.

See also:

Back to index

bool isTerminal ( ) const 

Tells whether the symbol is a terminal symbol, i.e. either a token or a constant.

See also:

Back to index

bool isConstant ( ) const 

Tells whether the symbol is a constant.

See also:

Back to index

bool isToken ( ) const 

Tells whether the symbol is a token.

See also:

Back to index

bool isExternalSymbol ( ) const 

Tells whether the symbol is defined in another grammar.

See also:

Back to index

const char * representation ( ) const 

Returns the representation of the symbol. If the symbol is a constant, it is the value of the constant. Otherwise, it is the name of the non-terminal or the token.

See also:

Back to index

unsigned long id ( ) const   [  private  ] 

Returns the internal unique identifier of the symbol. it is a number determined at generation time by the generator.

It is used internally and users may not find any interest in this number !

Private.

See also:

Back to index

bool getNext SymbolInfo & si   [  private  ] 

Initially foreseen to chain co-related symbol information, e.g. all symbol information for a set of first symbols.

Not used at the moment.

Private.

See also:

Back to index

void setNext ( const SymbolInfo & symbolInfo   [  private  ] 

Initially foreseen to chain co-related symbol information, e.g. all symbol information for a set of first symbols.

Not used at the moment.

Private.

See also:

Back to index

SymbolInfo & operator =( const SymbolInfo & si   [  protected  ] 

Assignment operator. Makes a copy of the symbol information.

See also:

Back to index


Generated with makedoc.