OILS / pgen2 / testdata / ll-star.grammar View on Github | oilshell.org

25 lines, 13 significant
1# Is pgen LL(*) ?
2
3ID: NAME
4
5expr: NUMBER
6
7
8# From section 2 of LL(*) ANTLR paper (2011).
9paper: ID | ID '=' expr | 'unsigned'* 'int' ID | 'unsigned'* ID ID
10
11paper_input: paper NEWLINE* ENDMARKER
12
13
14
15
16# From
17# https://theantlrguy.atlassian.net/wiki/spaces/ANTLR3/pages/2687279/What+is+the+difference+between+ANTLR+v2+and+v3
18
19type: 'unsigned' ['int']
20arg: 'arg'
21body: 'body'
22
23method: type ID '(' arg* ')' ';' | type ID '(' arg* ')' '{' body '}'
24
25method_input: method NEWLINE* ENDMARKER