first thank you for using SLY. I'm trying to learn now as well and the documentation/examples are well - less than helpful. (especially after starting with PLY).
So good job!
I'm using your base as a start to port the Monkey Language from go to python - not just straight python but using SLY. Monkey is by Thorsten Ball from his books.
so for this report - the UMINUS parser rule is incorrect - it should be:
@_('"-" expr %prec UMINUS')
def expr(self, p):
return ('neg',p.expr)
you'll have to handle the 'neq' in the interpreter....
again thanks for the this project!
first thank you for using SLY. I'm trying to learn now as well and the documentation/examples are well - less than helpful. (especially after starting with PLY).
So good job!
I'm using your base as a start to port the Monkey Language from go to python - not just straight python but using SLY. Monkey is by Thorsten Ball from his books.
so for this report - the UMINUS parser rule is incorrect - it should be:
@_('"-" expr %prec UMINUS')
def expr(self, p):
return ('neg',p.expr)
you'll have to handle the 'neq' in the interpreter....
again thanks for the this project!