|
Mercury.Formats library
1.0
The library provides format parsers for the Mercury library components.
|
Class for parsing grammar entities used in Mercury. More...
Public Member Functions | |
| GrammarEntityParser (Symbol epsilon) | |
| Initializes a new instance of the GrammarEntityParser class. More... | |
| Symbol | ParseSymbol (Token token) |
| Parses a symbol from a token. More... | |
| Rule | ParseRule (IList< Token > tokens) |
| Parses the rule. The rule is of the format A -> X Y Z... where A is a nonterminal symbols and X, Y and Z are terminals or nonterminals. If epsilon is used, the only format allowed is A -> epsilon. More... | |
| IList< Rule > | ParseMultiRule (IList< Token > tokens) |
Parses the multi-rule. It is of the form A -> RHS0 | RHS1 | ... where A -> RHS0 and A -> RHS1 are valid rules. More... | |
| Edge | ParseEdge (IList< Token > tokens) |
Parses the edge. It is of the form (l, r) A -> alpha . beta where l <= r and A -> alpha beta is a valid rule. More... | |
Properties | |
| Symbol | Epsilon [get, set] |
Class for parsing grammar entities used in Mercury.
Definition at line 18 of file EntityParser.cs.
| Mercury.Formats.Basic.GrammarEntityParser.GrammarEntityParser | ( | Symbol | epsilon | ) |
Initializes a new instance of the GrammarEntityParser class.
| epsilon | The epsilon symbol. |
| System.ArgumentException | Required epsilon symbol for Grammar Entity Parser |
Definition at line 28 of file EntityParser.cs.
| Edge Mercury.Formats.Basic.GrammarEntityParser.ParseEdge | ( | IList< Token > | tokens | ) |
Parses the edge. It is of the form (l, r) A -> alpha . beta where l <= r and A -> alpha beta is a valid rule.
| tokens | The tokens. |
Definition at line 104 of file EntityParser.cs.
| IList<Rule> Mercury.Formats.Basic.GrammarEntityParser.ParseMultiRule | ( | IList< Token > | tokens | ) |
Parses the multi-rule. It is of the form A -> RHS0 | RHS1 | ... where A -> RHS0 and A -> RHS1 are valid rules.
| tokens | The tokens. |
Definition at line 76 of file EntityParser.cs.
| Rule Mercury.Formats.Basic.GrammarEntityParser.ParseRule | ( | IList< Token > | tokens | ) |
Parses the rule.
The rule is of the format A -> X Y Z... where A is a nonterminal symbols and X, Y and Z are terminals or nonterminals. If epsilon is used, the only format allowed is A -> epsilon.
| tokens | The tokens. |
Definition at line 59 of file EntityParser.cs.
| Symbol Mercury.Formats.Basic.GrammarEntityParser.ParseSymbol | ( | Token | token | ) |
Parses a symbol from a token.
| token | The token. |
Definition at line 41 of file EntityParser.cs.
|
getset |
Definition at line 134 of file EntityParser.cs.
1.8.7