Home | Index | universal Index | gsp Index | Examples | Tutorial

SymbolInfo Class Reference

#include "gsp__Symbol.h"

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


Public Functions

SymbolInfo ( const SymbolInfo & si 
~SymbolInfo ( ) 
  • bool 
isConstant ( ) const 
  • bool 
isExternalSymbol ( ) const 
  • bool 
isNonTerminal ( ) const 
  • bool 
isTerminal ( ) const 
  • bool 
isToken ( ) const 
  • bool 
isValid ( ) const 
  • const char * 
representation ( ) const 

Protected Functions

operator =( const SymbolInfo & si 

Private Functions

SymbolInfo ( const LLParser & parser 
SymbolInfo ( unsigned long uSymbolDescription , const LLParser & parser 
  • bool 
getNext SymbolInfo & si 
  • unsigned long 
id ( ) const 
  • void 
setNext ( const SymbolInfo & symbolInfo 

Private Variables

  • bool 
m_bIsValid 
m_pNext 
m_parser 
  • unsigned long 
m_uSymbolDescription 

Public Static Variables

  • unsigned long 
CONSTANT_TYPE_MASK 
  • unsigned long 
EXTERNAL_SYMBOL_TYPE_MASK 
  • unsigned long 
INVALID_SYMBOL_DESCRIPTION 
  • unsigned long 
NON_TERMINAL_TYPE_MASK 
  • unsigned long 
TOKEN_TYPE_MASK 

Friends

  • class 
Symbol 
  • class 
SymbolInfoCursor 

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.


Files Included

#include <iostream>
#include "universal.h"

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


This file is part of the LLOOP LL Object-Oriented Parser Generator and Object Expander Generator. Copyright (c) 2005-2006 Michel MEHL, France. All rights reserved. LLOOP is distributed by the company ERSA SaRL.


Copyright (c) 2005-2006 Michel MEHL, Haguenau, France
LLOOP version 1.1


Generated with makedoc.