1 ;  GrammarPoly.dat
 2 ;
 3 ; ---------------------------------------------------------------------------
 4 ;
 5 ;  Grammar for a polynomial with an optional modulus.
 6 ;  Examples:
 7 ;
 8 ;       x ^ 2 + 1
 9 ;       3 x ^ 5 + 2 x + 1, 3
10 ;       x, 2
11 ;       5
12 ;
13 ; ---------------------------------------------------------------------------
14 
15 ;  Productions.
16 
17 (
18     (S          -> Poly Mod)
19     (Mod        -> comma integer / EPSILON)
20     (Poly       -> Poly + Term / Term)
21     (Term       -> Multiplier Power)
22     (Multiplier -> integer / EPSILON)
23     (Power      -> x / x ^ integer / EPSILON )
24 )
25 
26 
27 ;  Terminal symbols.
28 
29 ( comma + integer ^ x )