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

Issue 373 #391

Merged
merged 7 commits into from
May 1, 2015
Merged

Issue 373 #391

merged 7 commits into from
May 1, 2015

Conversation

zenspider
Copy link
Contributor

Correct state transitions for cmdargs. Fixes #373.

zenspider and others added 4 commits April 8, 2015 17:12
Add IS_BEG macro to start getting in sync with 1.9 impl.
Fix lexer for open paren.
Fix lexState assignment for tLABEL scanning.
Add missing EXPR_* values, even if we're not using them yet.
@zenspider
Copy link
Contributor Author

I can't do anything with the output from the CI. It says nothing of value. Clue?

966 % cd maglev
967 % ../rebuild.sh

cd ~/maglev
+ cd /home/ryan/maglev

(cd src/kernel/parser && ./parser.sh)
+ cd src/kernel/parser
+ ./parser.sh
  byacc ok
Compiling rubyast.o
Linking libmagparse.so
Copying libmagparse.so to /home/ryan/maglev/gemstone/lib/
./bin/maglev-ruby -e 'puts(foo:1)'
+ ./bin/maglev-ruby -e 'puts(foo:1)'
{:foo=>1}

@timfel
Copy link
Member

timfel commented Apr 30, 2015

Well, the changes to the parser produce a syntax error in Class.rb during primitive loading. There isn't much more in the log :(

@AllenOtis
Copy link
Contributor

The last time I debugged parser issues in primitive loading, I started a
stone with the extent0.dbf from the smalltalk server. Then using the
following .topazini contents
----------- .topazini
set user DataCurator pass swordfish
set gemstone
display oops
omit classoops
set stackpad 50
set tab 8
omit bytes
limit bytes 5000
limit oops 20
level 0

display pauseone

Then at the topaz prompt execute the following commands

output push loadprims.out
limit bytes 100
display pauseonerror
inp $MAGLEV_HOME/src/smalltalk/ruby/allprims.gs

Topaz will stop at the first error .

On Thu, Apr 30, 2015 at 8:14 AM, Tim Felgentreff notifications@github.com
wrote:

Well, the changes to the parser produce a syntax error in Class.rb during
primitive loading. There isn't much more in the log :(


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

@zenspider
Copy link
Contributor Author

Thanks Allan. That got me back on track, tho I'm mostly debugging by using maglev-ruby and tracing state transitions between mri's parser.y and maglev's grammar.y.

This should have put us back on track. It does not yet fix the two files that were broken in the last merge. I'll look at those next.

@timfel
Copy link
Member

timfel commented May 1, 2015

@zenspider thanks for doing all that work! The last time @matthias-springer and I worked on the parser (for the initial 1.9 push), it was a wholly frustrating experience...

@zenspider
Copy link
Contributor Author

BTW, my current approach is simply to fix up the state transitions as needed to match MRI 1.9's. This work is being done against the current parser and only towards addressing the cmdarg bug and any related bugs that crop up.

I also have a branch that is overhauling the entire grammar to match 1.9's (the current is a hybrid, but mostly 1.8). But since it's a much larger endeavor, I wanted to get the mainline running again so other's can keep going.

@zenspider
Copy link
Contributor Author

@timfel you're very very welcome. I'm just happy I can even contribute. I agree that it is frustrating, but I think I've got a couple tricks that are helping. I've doped all state transitions in MRI's and maglev's parsers and can run the same code side-by-side to see where we differ. It has made hunting these down a much easier affair.

@zenspider
Copy link
Contributor Author

Hold off merging. I might have a quick fix for the other files. Repro:

:rescue

really. :(

@zenspider
Copy link
Contributor Author

incoming

@zenspider
Copy link
Contributor Author

OK. Please review and merge.

}

// TODO: paren_nest++;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the issues with this todo pending? Do you have any code that doesn't parse because of this in particular?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore me, Chrome didn't refresh the code for some reason..

timfel added a commit that referenced this pull request May 1, 2015
@timfel timfel merged commit 289fd91 into MagLev:master May 1, 2015
@zenspider zenspider deleted the issue_373 branch May 1, 2015 10:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parser bug - command args
3 participants