2 expr := expr - expr # S/R conflict at state 4 on '-' token
5 # RUN: clang-pseudo -grammar %s -print-graph | FileCheck %s --check-prefix=GRAPH
8 # GRAPH-NEXT: _ := • expr EOF
9 # GRAPH-NEXT: expr := • expr - expr
10 # GRAPH-NEXT: expr := • IDENTIFIER
12 # GRAPH-NEXT: _ := expr • EOF
13 # GRAPH-NEXT: expr := expr • - expr
15 # GRAPH-NEXT: expr := IDENTIFIER •
17 # GRAPH-NEXT: _ := expr EOF •
19 # GRAPH-NEXT: expr := • expr - expr
20 # GRAPH-NEXT: expr := expr - • expr
21 # GRAPH-NEXT: expr := • IDENTIFIER
23 # GRAPH-NEXT: expr := expr - expr •
24 # GRAPH-NEXT: expr := expr • - expr
25 # GRAPH-NEXT: 0 ->[expr] 1
26 # GRAPH-NEXT: 0 ->[IDENTIFIER] 2
27 # GRAPH-NEXT: 1 ->[EOF] 3
28 # GRAPH-NEXT: 1 ->[-] 4
29 # GRAPH-NEXT: 4 ->[expr] 5
30 # GRAPH-NEXT: 4 ->[IDENTIFIER] 2
31 # GRAPH-NEXT: 5 ->[-] 4
33 # RUN: clang-pseudo -grammar %s -print-table | FileCheck %s --check-prefix=TABLE
36 # TABLE-NEXT: IDENTIFIER: shift state 2
37 # TABLE-NEXT: expr: go to state 1
39 # TABLE-NEXT: EOF: shift state 3
40 # TABLE-NEXT: -: shift state 4
42 # TABLE-NEXT: EOF -: reduce by rule 2 'expr := IDENTIFIER'
45 # TABLE-NEXT: IDENTIFIER: shift state 2
46 # TABLE-NEXT: expr: go to state 5
48 # TABLE-NEXT: -: shift state 4
49 # TABLE-NEXT: EOF -: reduce by rule 1 'expr := expr - expr'