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

Matching everything in a subexpression loops infinitely #26

Closed
rihardsk opened this issue Nov 19, 2015 · 1 comment
Closed

Matching everything in a subexpression loops infinitely #26

rihardsk opened this issue Nov 19, 2015 · 1 comment

Comments

@rihardsk
Copy link

I made a simple grammar

grammar = \
        """
        rule <- (subexpression)+;
        subexpression <- r'^.*$';
        """

and tried to parse a simple text like so

from arpeggio.peg import ParserPEG
parser = ParserPEG(grammar, "rule")
parsed = parser.parse("something simple")

And the process never finishes. It just goes on parsing, steadily filling up the free memory.

@igordejanovic
Copy link
Member

Hello, rihardsk.

Thanks for the report. It is fixed now on master.

Regards,
Igor

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

No branches or pull requests

2 participants