Commits

Anonymous committed 53c4e40

grammar cleanup

Comments (0)

Files changed (1)

src/parser/grammar.pg

 }
 
 rule comparison {
-  | 'more' <negative_adjective> {*} #= worse
-  | 'less' <negative_adjective> {*} #= better
-  | 'more' <positive_adjective> {*} #= better
-  | 'less' <positive_adjective> {*} #= worse
-  | <positive_comparative> {*} #= better
-  | <negative_comparative> {*} #= worse
+  | ['more' <negative_adjective> 
+    |'less' <positive_adjective>
+    |<negative_comparative>] {*} #= worse
+  | ['more' <positive_adjective>
+    |'less' <negative_adjective> 
+    |<positive_comparative>] {*} #= better
 }
 rule test {
   | 'if so,' <sentence>  {*} #= if
 }
 
 rule binary {
-  |'the' 'remainder' 'of' 'the' 'quotient' 'between' <value> 'and' <value> {*} #= mod
-  |'the' 'difference' 'between' <value> 'and' <value> {*} #= sub
-  |'the' 'sum' 'of' <value> 'and' <value> {*} #= add
-  |'the' 'product' 'of' <value> 'and' <value> {*} #= mul
-  |'the' 'quotient' 'between' <value> 'and' <value> {*} #= div
+<article>?
+[
+  |'remainder' 'of' 'the' 'quotient' 'between' <value> 'and' <value> {*} #= mod
+  |'difference' 'between' <value> 'and' <value> {*} #= sub
+  |'sum' 'of' <value> 'and' <value> {*} #= add
+  |'product' 'of' <value> 'and' <value> {*} #= mul
+  |'quotient' 'between' <value> 'and' <value> {*} #= div
+]
 }
 
 rule unary {
 }
 rule exeunts {
 '[' 
-  [
-  |'exeunt' <charlist> {*} #= list
-  |'exeunt' {*} #= empty
-  ]
+ 'exeunt' <charlist> {*} #= list
 ']'
 }