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

Issue with added c++ as keyword #1

Open
vi3k6i5 opened this issue Dec 12, 2017 · 1 comment
Open

Issue with added c++ as keyword #1

vi3k6i5 opened this issue Dec 12, 2017 · 1 comment

Comments

@vi3k6i5
Copy link

vi3k6i5 commented Dec 12, 2017

Thanks for the library, will definitely try it out:

I am facing a simple issue meanwhile:

t = Triegex('foo', 'bar', 'baz')

t.to_regex()

t.add('c++')

'spam' in t

import re

re.findall(t.to_regex(), 'c++')

Full stack trace is too long, sharing last part of it here

    639             if item[0][0] in _REPEATCODES:
    640                 raise source.error("multiple repeat",
--> 641                                    source.tell() - here + len(this))
    642             if sourcematch("?"):
    643                 subpattern[-1] = (MIN_REPEAT, (min, max, item))

error: multiple repeat at position 19
@ZhukovAlexander
Copy link
Owner

@vi3k6i5 triegex only supports simple words at the moment. Also, note that 'c++' is not
escaped by triegex, which leads to re failing to parse the regex (see similar issue).

I'll take a look to see what I can do.

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