Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

Parser: Stabby Lambda #410

Open
johnnyt opened this issue Jul 21, 2015 · 5 comments
Open

Parser: Stabby Lambda #410

johnnyt opened this issue Jul 21, 2015 · 5 comments
Labels

Comments

@johnnyt
Copy link
Member

johnnyt commented Jul 21, 2015

MRI 1.9.3

ruby -e 'p ->{ }'
#<Proc:0x007f9edb10d520@-e:1 (lambda)>

MagLev

maglev-ruby -e 'p ->{ }'
-e:3, syntax error, unexpected '>'
ERROR 2702 , a RubyParseError occurred (error 2702), WARNING, line 3: ambiguous first argument; put parentheses or even spaces
-e:3: syntax error, unexpected '>'
unexpected EOF at line 6 (RubyParseError)
topaz 1> exit
@johnnyt johnnyt added the Parser label Jul 21, 2015
@zenspider
Copy link
Contributor

I believe I have this fixed in my branch. Double checking...

@zenspider
Copy link
Contributor

I have it finished on the parser side but have a bug in the lexer that I was unable to resolve at the time.

@zenspider
Copy link
Contributor

Yeah. Hitting the same problem I hit before. I'm adding:

  ps->paren_nest = 0;
  ps->lpar_beg = 0;

to the rb_parse_state and it causes segfaults left and right. I'm not sure why adding 2 ints to the struct will create such havoc.... but I suspect something hinky is going on. I have yet to attach with a debugger to poke deeper.

@AllenOtis any hints?

@AllenOtis
Copy link
Contributor

I need to see a diff of what you changed. Note that C++ classes
YyStackElement
and YyStackData can't be changed without also recompiling the server with
the same changes (see comments about "must agree ... with om.hf" ).

On Tue, Jul 21, 2015 at 4:29 PM, Ryan Davis [email protected]
wrote:

Yeah. Hitting the same problem I hit before. I'm adding:

ps->paren_nest = 0;
ps->lpar_beg = 0;

to the rb_parse_state and it causes segfaults left and right. I'm not
sure why adding 2 ints to the struct will create such havoc.... but I
suspect something hinky is going on. I have yet to attach with a debugger
to poke deeper.

@AllenOtis https://github.com/AllenOtis any hints?


Reply to this email directly or view it on GitHub
#410 (comment).

@johnnyt
Copy link
Member Author

johnnyt commented Jul 23, 2015

Hey @zenspider - do you have the branch/code available for us to look at?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants