Commits

Anonymous committed 027d2fa

merge comparisons

Comments (0)

Files changed (2)

src/parser/actions.pm

   make $( $/{$key} );
 }
 
-method question($/, $k) {
-  my $res;
-  if $k eq 'eq' {
-    $res := mkcall0( 'equal' );
-  }
-  else {
-    $res := $($<comparison>);
-  }
+method question($/) {
+  my  $res := $($<comparison>);
   for $<value> {
     $res.push( $( $_ ));
   }

src/parser/grammar.pg

 }
 
 rule question {
-  | <be> <value> <comparison> 'than' <value>{*} #= diseq
-  | <be> <value> 'as' <adjective> 'as' <value>{*} #= eq
+  <be> <value> <comparison> <value>{*}
 }
 
 rule comparison {
   | ['more' <negative_adjective> 
     |'less' <positive_adjective>
-    |<negative_comparative>] {*} #= worse
+    |<negative_comparative>] 'than' {*} #= worse
   | ['more' <positive_adjective>
     |'less' <negative_adjective> 
-    |<positive_comparative>] {*} #= better
+    |<positive_comparative>] 'than' {*} #= better
+  | 'as' <adjective> 'as' {*} #= equal
 }
 rule test {
   | 'if so,' <sentence>  {*} #= if