File: empty_clauses.g

package info (click to toggle)
yapps2 2.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 408 kB
  • sloc: python: 1,016; sh: 24; makefile: 13
file content (10 lines) | stat: -rw-r--r-- 256 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
# This parser tests the use of OR clauses with one of them being empty
#
# The output of --dump should indicate the FOLLOW set for (A | ) is 'c'.

parser Test:
    rule TestPlus: ( A | ) 'c'
    rule A: 'a'+

    rule TestStar: ( B | ) 'c'
    rule B: 'b'*