Closed Baael closed 8 years ago
similar bug:
this is not working at all (hangs compiler), or is producing similar bug to previous
_callable: -> choice(
@identifier
@accessor
@this
@this_property
)
func_call: -> prec 3, seq @_callable, @body
invocation: -> prec.right 1, seq @_callable, ' ',choice @invocation, @_statement
while this works perfectly:
func_call: -> prec 3, seq choice(
@identifier
@accessor
@this
@this_property
), @body
invocation: -> prec.right 1, seq choice(
@identifier
@accessor
@this
@this_property
), ' ',choice @invocation, @_statement
# a a.a(a) => (invocation (identifier) (func_call (accessor (identifier) (identifier)) (body (identifier)))
Could you share the whole grammar that includes these rules? I'd like to run compile
myself and see what I can figure out.
I had issues with precedences, I was trying to fix it in the evening, and now I cannot reproduce bug :) When it will apear again I will place grammar here ASAP.
Ok thanks @Baael. I'm going to close this out for now, but we can reopen if it happens to you again.
I got a little problem, I am wondering if I made mistake somewhere or it is a bug.
This code:
Generates:
While whenever I will add "optional" rule
it generates: