home
/
code
/
tiger.ml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove stand-alone fun_call grammar rule
[tiger.ml.git]
/
tiger
/
src
/
lib
/
tiger
/
tiger_parser.mly
diff --git
a/tiger/src/lib/tiger/tiger_parser.mly
b/tiger/src/lib/tiger/tiger_parser.mly
index
bbf89f7
..
4497ce3
100644
(file)
--- a/
tiger/src/lib/tiger/tiger_parser.mly
+++ b/
tiger/src/lib/tiger/tiger_parser.mly
@@
-109,9
+109,16
@@
exp:
{
sprintf "string[%S]" $1
}
{
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
{
}
| exp op exp
{
@@
-294,19
+301,6
@@
rec_field_assignments:
sprintf "%S = %s, %s" id exp 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
{
fun_args:
| exp
{
This page took
0.025197 seconds
and
4
git commands to generate.