While I have warning for the grammar? How shall I change it ? Can I get correct grammar without changing parentheses positions ? test : ( A B | C D ) | ( A D ) ; warning: nondeterminism upon k==1:A k==2:D k==3:EOF Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/