Merge pull request #2680 from listba/patch-1
Documentation: Added Missing lexer/parermodifier clarification in example
This commit is contained in:
commit
dce97a050d
|
@ -240,6 +240,7 @@ YYYY/MM/DD, github id, Full name, email
|
|||
2019/09/28, lmy269, Mingyang Liu, lmy040758@gmail.com
|
||||
2019/10/29, tehbone, Tabari Alexander, tehbone@gmail.com
|
||||
2019/10/31, a-square, Alexei Averchenko, lex.aver@gmail.com
|
||||
2019/11/05, listba, Ben List, ben.list89@gmail.com
|
||||
2019/11/11, foxeverl, Liu Xinfeng, liuxf1986[at]gmail[dot]com
|
||||
2019/11/17, felixn, Felix Nieuwenhuizhen, felix@tdlrali.com
|
||||
2019/11/18, mlilback, Mark Lilback, mark@lilback.com
|
||||
|
|
|
@ -26,8 +26,8 @@ The Javadoc comments are hidden from the parser and are ignored at the moment.
|
|||
Token names always start with a capital letter and so do lexer rules as defined by Java’s `Character.isUpperCase` method. Parser rule names always start with a lowercase letter (those that fail `Character.isUpperCase`). The initial character can be followed by uppercase and lowercase letters, digits, and underscores. Here are some sample names:
|
||||
|
||||
```
|
||||
ID, LPAREN, RIGHT_CURLY // token names/rules
|
||||
expr, simpleDeclarator, d2, header_file // rule names
|
||||
ID, LPAREN, RIGHT_CURLY // token names/lexer rules
|
||||
expr, simpleDeclarator, d2, header_file // parser rule names
|
||||
```
|
||||
|
||||
Like Java, ANTLR accepts Unicode characters in ANTLR names:
|
||||
|
|
Loading…
Reference in New Issue