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

Parsing error for what appears to be valid rule #20

Closed
JohnCokerC3 opened this issue Sep 9, 2018 · 2 comments
Closed

Parsing error for what appears to be valid rule #20

JohnCokerC3 opened this issue Sep 9, 2018 · 2 comments

Comments

@JohnCokerC3
Copy link
Contributor

This rule causes a parsing error:

func_mods ::= func_mod+ ('private' func_mod*)?
java.lang.IllegalStateException: Expecting start of a comment after '(' but could not find '*'!
	at net.nextencia.rrdiagram.grammar.model.BNFToGrammar.convert(BNFToGrammar.java:320)
	at net.nextencia.rrdiagram.grammar.model.BNFToGrammar.convert(BNFToGrammar.java:285)

It can be reproduced with this test:

  @Test
  public void testRepeatedOptional() {
     svg("func_mod+ ('private' func_mod*)?");
  }
@Chrriis
Copy link
Owner

Chrriis commented Jan 15, 2024

This was a silly error of the form:
cond1 && cond2 && a ==null? b == null: a.equals(b)
which should have been:
cond1 && cond2 && (a ==null? b == null: a.equals(b))

Thanks for reporting!

@Chrriis Chrriis closed this as completed Jan 15, 2024
@Chrriis
Copy link
Owner

Chrriis commented Jan 15, 2024

Just to mention that there was a bug which got fixed with that rule, but the original description of the problem did not match my observations with the latest code I used.

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