forked from GitHub/gf-core
Use LCLR algorithm for eliminating left-recursion, with lambda terms in SISR for getting trees right.
This commit is contained in:
@@ -122,6 +122,7 @@ Expr16 : Ident { EVar $1 }
|
||||
| 'null' { ENull }
|
||||
| 'this' { EThis }
|
||||
| 'function' '(' ListIdent ')' '{' ListStmt '}' { EFun $3 (reverse $6) }
|
||||
| '(' Expr ',' ListExpr ')' { eseq1_ $2 $4 }
|
||||
| '(' Expr ')' { $2 }
|
||||
|
||||
|
||||
@@ -201,5 +202,6 @@ happyError ts =
|
||||
_ -> " before " ++ unwords (map prToken (take 4 ts))
|
||||
|
||||
myLexer = tokens
|
||||
eseq1_ x_ xs_ = ESeq (x_ : xs_)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user