aymara / aymara/lima

Rule parser accept wrong syntax and generate buggy automaton

Open
#34 0 comments 0 reactions 1 assignee Claimed by @romaricb View on GitHub
bug
Dominant language
C++
Stars
119
Forks
20
PR merge metrics
No merged PRs in 30d

Description

The rule below is wrong. Either there should be parentheses around `t_capital_1st` or the `{1-3}` should be moved out of the group:
`@Street::,? (de la|de|du|des|à|aux)? ($NC|$NP|t_capital_1st{1-3}):LOCATION:`

But the parser silently accepts it and produces an automaton which matches wrongly and produces a corrupted analyses graph. When analyzing `Cette maison est la plus belle de la rue.`, "rue" is wrongly matched and replaced by a token with no linguistic data (see graph below)

![graph](https://cloud.githubusercontent.com/assets/3354467/10190736/0b616598-676f-11e5-805f-f7b45374792d.png)
.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.