The Symbol type is used to represent each terminal, special terminal and nonterminal in the Symbol Table. type Symbol
end type
Each rule consists of a series of symbols, both terminals and nonterminals, and the single Head nonterminal that the rule defines. After the tables are loaded, Rules should not be able to be modified. type Rule
end type
When the parsing engine has read enough tokens to conclude a rule in the grammar is complete, it is 'reduced' and passed to the developer. Basically a 'reduction' will contain the tokens which correspond to the symbols of the rule. Tokens can represent actual data read from the file (a.k.a. terminals), but also may contain objects as well. Since a reduction contains the terminals of a rule as well as the nonterminals (reductions made earlier), the parser engine creates a "parse tree" which contains a break down of the source text along the grammar's rules. type Reduction
end type
The Token type extends the Symbol type and is used to stored parsed data. Unlike symbols, which are used to represent a category of terminals and nonterminals, tokens represent different instances of these symbols. The information that is read from the source stream is stored into the "Data" property which can be modified at the developer's will. type Token
end type
LALR PARSER: type LALR-Action
end type
type LALR-State
end type
DFA TOKENIZER: type DFA-State
end type
type DFA-Edge
end type |