Closed dweiss closed 3 years ago
Thanks for the report, I'll try to find time for this shortly
No worries. Thank you!
So I've been looking into this bug and am having trouble reproducing it... The example you provide has a syntax error, and even if corrected, I don't see an issue (even when adding tokens like your _TERM_CHAR). Could you provide a minimal working example?
Hi Clement. I will, sure. I am away from my computer - will do it tomorrow.
On Sat, Sep 19, 2020, 13:36 Clément Fournier notifications@github.com wrote:
So I've been looking into this bug and am having trouble reproducing it... The example you provide has a syntax error, and even if corrected, I don't see an issue (even when adding tokens like your _TERM_CHAR). Could you provide a minimal working example?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/oowekyala/intellij-javacc/issues/17#issuecomment-695202498, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABQWLQDSUXCJA6LJMIUJWTSGSJVDANCNFSM4RRX3IUQ .
This is a smaller example that reproduces the problem.
PARSER_BEGIN(Example)
public class Example {
}
PARSER_END(Example)
<DEFAULT> TOKEN : {
<#_FRAGMENT: ["0"-"9"] >
| <QUOTED: "\"" ( <_FRAGMENT> )* "\"">
| <ZERO: "0" >
}
public Void Rule() :
{
}
{
<QUOTED> | <ZERO>
{
return null;
}
}
Note how QUOTED uses the fragment to define a regexp that contains it. The fragment will never match on its own but the plugin claims a conflict with token ZERO.
Misclick
Thanks, I'll look into this tomorrow
This isn't urgent. Thanks!
On Sat, Sep 19, 2020, 21:51 Clément Fournier notifications@github.com wrote:
Misclick
Thanks, I'll look into this tomorrow
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/oowekyala/intellij-javacc/issues/17#issuecomment-695349550, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABQWLVVYDH3WI7UHCZ3FTLSGUDTJANCNFSM4RRX3IUQ .
I was able to reproduce the bug, it should be fixed in version 1.7, which I'll release sometime this week. Thanks for your cooperation Dawid !
Thank you for the plugin. It is helpful. I just wanted to point out that currently "partial" regexp definitions cause warnings. Something like:
would bring a warning like this:
This isn't true because pound-starting definitions don't generate tokens of their own - they're just expanded into final tokens, if used.