question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ValueOption warnings

See original GitHub issue

Hello again,

I’m getting following warnings from BuildResult it seems related to ValueOption:

"non terminal [GROUP-COMPARATOR-StringConcatExpr] is never used."
"non terminal [GROUP-TO[d]-AdditiveExpr] is never used."
"non terminal [GROUP-Argument-ExtraArgumentList] is never used."

Also,

I have the following rule:

[Production("RangeExpr: AdditiveExpr (TO [d] AdditiveExpr)?")]
public object RangeExpr(object additiveExpr, ValueOption<Group<XPathToken, object>> optionalGroup)

When I delete the optional group clause it works without problem, but when I add the rule, the program gives the following exception. Note that, the parsed string does not contain anything related to the optional group clause

OUTCH Object of type 'sly.parser.parser.ValueOption`1[System.Object]' cannot be converted to type 
'sly.parser.parser.ValueOption`1[sly.parser.parser.Group`2[netSchematron.XPathToken,System.Object]]'. 
calling RangeExpr__AdditiveExpr_GROUP-TO[d]-AdditiveExpr? =>  RangeExpr

We have talked about this exception before in this issue however, I can not seem to identify the lexer problem this time.

I think the warnings and the exception are connected.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
b3b00commented, Dec 26, 2018

thanks for the test case. i now have a failing unit test (see it on branch bugfix/#104). I see what hapen. And will try to solve it later. For now my best proposal is to get rid of the group and use another nonterminal that you can optioned

XPath: AndExpr newNonTerminal ? newNonTerminal : COMPARATOR AndExpr

it’s exactly what the group does but it fails on the particular case of an empty option.

0reactions
aeb-devcommented, Dec 27, 2018

seems to be working thank you very much.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning Options (Using the GNU Compiler Collection (GCC))
This warning is enabled by default for C and C++ programs. This option controls warnings when a switch case has a value that...
Read more >
Warning control — Python 3.11.4 documentation
The warnings filter is initialized by -W options passed to the Python interpreter command line and the PYTHONWARNINGS environment variable.
Read more >
Warning: Use the 'defaultValue' or 'value' props on <select> ...
I am using selected attribute on option but React generates a warning asking me to use default value on select. For e.g. render:...
Read more >
`value` of Option should not use number type when `mode ...
The warning is not there anymore despite value of option having number type. I see warning only in "tags" mode.
Read more >
Options to Request or Suppress Warnings — gcc 6 ...
Warnings are diagnostic messages that report constructions that are not inherently erroneous but that are risky or suggest there may have been an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found