Start of several alternatives |
Top Previous Next |
Grammar tests > Start of several alternatives
The warning
LL(1) error: "X" is the start of several alternatives
appears, if alternatives are binning with the same terminal symbol. For example in the following rule:
Greeting ::= "good" "morning" | "hello" | "good" "evening"
the first and the last greeting are beginning with the word "good". If TETRA finds this word in the input, the first alternative would be chosen, even if the word "tag" were following. The rule has to be rewritten as follows:
Greeting ::= "good" ("morning" | "evening" ) | "hello"
|
This page belongs to the TextTransformer Documentation |
Home Content German |