-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
The latest lpeg(0.12.1) does not support left-recuision, alway throw error "empty loop in rule ..."
So the grammar in parser.lua should remove the left-recursion.
I found these syntax used left-recursion:
prefixexp ::= var | functioncall | ‘(’ exp ‘)’
functioncall ::= prefixexp args | prefixexp ‘:’ Name args
var ::= Name | prefixexp ‘[’ exp ‘]’ | prefixexp ‘.’ Name
and this:
exp ::= nil | false | true | Numeral | LiteralString | ‘...’ | functiondef |
prefixexp | tableconstructor | exp binop exp | unop exp
I know the errors but can not correct them because I am studying the LPEG now and have not got it.
Please correct them or waiting for me until I had understood the LPEG clearly.
Sorry for my poor english.
Metadata
Metadata
Assignees
Labels
No labels