llvm/clang-tools-extra/pseudo/test/lr-build-basic.test

_ := expr EOF
expr := id
id := IDENTIFIER

# RUN: clang-pseudo -grammar %s -print-graph | FileCheck %s --check-prefix=GRAPH
#      GRAPH: States:
# GRAPH-NEXT: State 0
# GRAPH-NEXT:     _ :=  • expr EOF
# GRAPH-NEXT:     expr :=  • id
# GRAPH-NEXT:     id :=  • IDENTIFIER
# GRAPH-NEXT: State 1
# GRAPH-NEXT:     _ := expr • EOF
# GRAPH-NEXT: State 2
# GRAPH-NEXT:     expr := id • 
# GRAPH-NEXT: State 3
# GRAPH-NEXT:     id := IDENTIFIER • 
# GRAPH-NEXT: State 4
# GRAPH-NEXT:     _ := expr EOF • 

# RUN: clang-pseudo -grammar %s -print-table | FileCheck %s --check-prefix=TABLE
#      TABLE: LRTable:
# TABLE-NEXT: State 0
# TABLE-NEXT:     IDENTIFIER: shift state 3
# TABLE-NEXT:     expr: go to state 1
# TABLE-NEXT:     id: go to state 2
# TABLE-NEXT: State 1
# TABLE-NEXT:     EOF: shift state 4
# TABLE-NEXT: State 2
# TABLE-NEXT:     EOF: reduce by rule 2 'expr := id'
# TABLE-NEXT: State 3
# TABLE-NEXT:     EOF: reduce by rule 1 'id := IDENTIFIER'
# TABLE-NEXT: State 4