fix typos in docs
This commit is contained in:
parent
1251da034a
commit
fb43a50f8a
@ -57,7 +57,7 @@ described by the following list of token tuples::
|
|||||||
[ ('ID','x'), ('EQUALS','='), ('NUMBER','3'),
|
[ ('ID','x'), ('EQUALS','='), ('NUMBER','3'),
|
||||||
('PLUS','+'), ('NUMBER','42'), ('TIMES','*'),
|
('PLUS','+'), ('NUMBER','42'), ('TIMES','*'),
|
||||||
('LPAREN','('), ('ID','s'), ('MINUS','-'),
|
('LPAREN','('), ('ID','s'), ('MINUS','-'),
|
||||||
('ID','t'), ('RPAREN',')' ]
|
('ID','t'), ('RPAREN',')') ]
|
||||||
|
|
||||||
The SLY ``Lexer`` class is used to do this. Here is a sample of a simple
|
The SLY ``Lexer`` class is used to do this. Here is a sample of a simple
|
||||||
lexer that tokenizes the above text::
|
lexer that tokenizes the above text::
|
||||||
@ -1212,7 +1212,7 @@ appear as the last token on the right in an error rule. For example::
|
|||||||
This is because the first bad token encountered will cause the rule to
|
This is because the first bad token encountered will cause the rule to
|
||||||
be reduced--which may make it difficult to recover if more bad tokens
|
be reduced--which may make it difficult to recover if more bad tokens
|
||||||
immediately follow. It's better to have some kind of landmark such as
|
immediately follow. It's better to have some kind of landmark such as
|
||||||
a semicolon, closing parenthesese, or other token that can be used as
|
a semicolon, closing parentheses, or other token that can be used as
|
||||||
a synchronization point.
|
a synchronization point.
|
||||||
|
|
||||||
Panic mode recovery
|
Panic mode recovery
|
||||||
|
Loading…
Reference in New Issue
Block a user