drmfinlay / pyjsgf

JSpeech Grammar Format (JSGF) compiler, matcher and parser package for Python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unary operators are not parsed correctly if used as alternatives

drmfinlay opened this issue · comments

I have noticed a bug with the parser where unary operators * and + are not parsed correctly if used directly in alternative sets. For example:

parse_expansion_string('small+|medium+|large+').compile()
# produces '(small|+|medium|+|(large)+)' instead of '((small)+|(medium)+|(large)+)'