Remove stand-alone fun_call grammar rule
authorSiraaj Khandkar <siraaj@khandkar.net>
Mon, 28 May 2018 17:47:25 +0000 (13:47 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Mon, 28 May 2018 17:47:25 +0000 (13:47 -0400)
tiger/src/lib/tiger/tiger_parser.mly

index bbf89f7..4497ce3 100644 (file)
@@ -109,9 +109,16 @@ exp:
     {
       sprintf "string[%S]" $1
     }
-  | fun_call
+  | ID unit
     {
-      $1
+      let id = $1 in
+      sprintf "fun_call[%s, []]" id
+    }
+  | ID LPAREN fun_args RPAREN
+    {
+      let id = $1 in
+      let fun_args = $3 in
+      sprintf "fun_call[%s, %s]" id fun_args
     }
   | exp op exp
     {
@@ -294,19 +301,6 @@ rec_field_assignments:
       sprintf "%S = %s, %s" id exp rec_field_assignments
     }
 
-fun_call:
-  | ID unit
-    {
-      let id = $1 in
-      sprintf "fun_call[%s, []]" id
-    }
-  | ID LPAREN fun_args RPAREN
-    {
-      let id = $1 in
-      let fun_args = $3 in
-      sprintf "fun_call[%s, %s]" id fun_args
-    }
-
 fun_args:
   | exp
     {
This page took 0.024988 seconds and 4 git commands to generate.