File Content: Symbols

Structure

Each record describing a symbol in the Symbol Table is preceded by a byte containing the value 83 - the ASCII value of "S". The file will contain one of these records for each symbol in the grammar. The Table Count record, which precedes any symbol records, will contain the total number of symbols.

Fields

Item Type Description
Index Integer This parameter holds the index of the symbol in the Symbol Table. The symbol should be stored directly at this Index.
Name String The name of the symbol is stored as a Unicode string.
Kind Integer This number denotes the kind (or type) of the symbol.  The description of each constant is described below:

Symbol 'Kind' Constants

Value Name Description
0 SymbolTypeNonterminal Normal Nonterminal
1 SymbolTypeTerminal Normal Terminal
2 SymbolTypeWhitespace Whitespace Terminal
3 SymbolTypeEnd End Character - End of File. This symbol is used to represent the end of the file or the end of the source input.
4 SymbolTypeCommentStart Start of a block quote
5 SymbolTypeCommentEnd End of a block quote
6 SymbolTypeCommentLine Line Comment Terminal
7 SymbolTypeError Error Terminal. If the parser encounters an error reading a token, this kind of symbol can used to differentiate it from other terminal types.