Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List index out of bounds error on complex input #20

Closed
woutersl opened this issue Oct 22, 2014 · 4 comments
Closed

List index out of bounds error on complex input #20

woutersl opened this issue Oct 22, 2014 · 4 comments
Labels
Milestone

Comments

@woutersl
Copy link
Member

Original report by me.


Hi,

I've written a grammar using Hime that I'm using to parse some fairly large Object Pascal source files. Unfortunately I was getting a list index out of bounds exception on some of the more complex files; downloading the source, the problem was that I was overflowing the parser stack somehow.

Increasing the Hime.Redist.Parsers.BaseLRParser.MAX_STACK_SIZE constant and recompiling has resolved the problem - but it'd be nice if a future release could incorporate a fix, either through a larger fixed stack or a resizable stack that grows automatically?

(I've also had an issue that looks like it may require context sensitive parsing - but I see you're already considering that. Thank you for all your work on Hime - it's proven very useful!)

@woutersl
Copy link
Member Author

Original comment by Laurent Wouters (Bitbucket: 557058:675792b6-d731-4823-9f7d-c6dfcb2df2b5, ).


Verified, this is an issue in version 1.3.0 and up in the .Net and Java runtimes.
Related issues:

  • LRkASTBuilder (stack field) in .Net and Java runtimes

@woutersl
Copy link
Member Author

Original comment by Laurent Wouters (Bitbucket: 557058:675792b6-d731-4823-9f7d-c6dfcb2df2b5, ).


Same problem in LRkSimulator in .Net and Java runtimes.

@woutersl
Copy link
Member Author

Original comment by Laurent Wouters (Bitbucket: 557058:675792b6-d731-4823-9f7d-c6dfcb2df2b5, ).


[fix] Fixed issue #20 by growing the LR(k) stacks on demand

1 similar comment
@woutersl
Copy link
Member Author

Original comment by Laurent Wouters (Bitbucket: 557058:675792b6-d731-4823-9f7d-c6dfcb2df2b5, ).


[fix] Fixed issue #20 by growing the LR(k) stacks on demand

@woutersl woutersl added this to the 1.4.0.release milestone Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant