6.9.1.2. Reserved Symbols

6.9.1.2. Reserved Symbols

The following symbols are reserved by the system. EPS is a nonterminal which derives nothing, commonly called epsilon. It can be used in the client grammar, but must not be the LHS of a production.

EOF is a terminal, marking the end of the input stream. It must not be used in the client grammar. Some parsers may prohibit the inclusion of this symbol in the input stream, others may require it, and others may require an infinite stream of them at the end of the input.

In addition, the empty string and -1 are reserved as symbols by the system.

Note: this is ugly. We should use a class, but the repr() of a class is ugly.

Start python section to interscript/parsers/lalr1.py[2]
     7: #line 42 "lalr1_parser.ipk"
     8: EPS = "<EPS>"
     9: EOF = "<EOF>"
    10: 
End python section to interscript/parsers/lalr1.py[2]