File: empty_clauses.g

package info (click to toggle)
yapps2 2.1.1-17
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 256 kB
  • ctags: 149
  • sloc: python: 1,008; makefile: 58; sh: 14
file content (10 lines) | stat: -rw-r--r-- 256 bytes parent folder | download | duplicates (6)
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'*