mirror of
https://github.com/cwbaker/lalr.git
synced 2026-09-26 16:33:18 +03:00
23 lines
461 B
C++
23 lines
461 B
C++
#ifndef LALR_PARSERSYMBOL_HPP_INCLUDED
|
|
#define LALR_PARSERSYMBOL_HPP_INCLUDED
|
|
|
|
#include "SymbolType.hpp"
|
|
|
|
namespace lalr
|
|
{
|
|
|
|
/**
|
|
// A symbol used by the parser
|
|
*/
|
|
class ParserSymbol
|
|
{
|
|
public:
|
|
int index; ///< The index of this symbol.
|
|
const char* identifier; ///< The identifier of this symbol.
|
|
const char* lexeme; ///< The lexeme of this symbol or null if this symbol is non-terminal.
|
|
SymbolType type; ///< The type of this symbol.
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|