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

The circular structure appears inside the parsing chart #10

Open
lagodiuk opened this issue May 26, 2016 · 0 comments
Open

The circular structure appears inside the parsing chart #10

lagodiuk opened this issue May 26, 2016 · 0 comments
Labels

Comments

@lagodiuk
Copy link
Owner

lagodiuk commented May 26, 2016

Error during parsing of the following grammar:

S -> A
A -> ( A ) | A A | _EPSILON_

The circular structure appears inside the parsing chart (the message from log: "earley-oop.min.js:5 Uncaught TypeError: Converting circular structure to JSON"). Despite the fact that the circular structure was detected during the log output, actually the algorithm must not produce the states with circular references (because these references are used during backtracking, for the purpose of reconstruction of the parsing forest).

Link to example: https://jsfiddle.net/2mb3w9c1/49/

However, the following grammar can be successfully parsed:

S -> A
A -> ( A ) | A A | ( )

Hence, the issue is related to handling of the epsilon transitions.

@lagodiuk lagodiuk added the bug label May 27, 2016
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