Special Grammar not supported
See original GitHub issueThe Special Grammar is not supported. If I try the simple example matcher (m = r.sub.Name in (r.obj.Admins)
), I get an error:
com.googlecode.aviator.exception.ExpressionSyntaxErrorException: Syntax error: unexpect token 'in', maybe forget to insert ';' to complete last expression at 13, lineNumber: 1, token : [type='variable',lexeme='in'],
while parsing expression: `
r_sub.Name in^^^
`
at com.googlecode.aviator.AviatorEvaluatorInstance.innerCompile(AviatorEvaluatorInstance.java:1494)
at com.googlecode.aviator.AviatorEvaluatorInstance.access$000(AviatorEvaluatorInstance.java:180)
at com.googlecode.aviator.AviatorEvaluatorInstance$2.call(AviatorEvaluatorInstance.java:1465)
at com.googlecode.aviator.AviatorEvaluatorInstance$2.call(AviatorEvaluatorInstance.java:1462)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at com.googlecode.aviator.AviatorEvaluatorInstance.compile(AviatorEvaluatorInstance.java:1449)
at com.googlecode.aviator.AviatorEvaluatorInstance.compile(AviatorEvaluatorInstance.java:1413)
at com.googlecode.aviator.AviatorEvaluatorInstance.compile(AviatorEvaluatorInstance.java:1400)
at org.casbin.jcasbin.main.CoreEnforcer.enforce(CoreEnforcer.java:439)
at org.casbin.jcasbin.main.CoreEnforcer.enforce(CoreEnforcer.java:546)
...
The parsing seems to incorrectly see in
as variable and not as operator.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Special Cases in Subject Verb Agreement | Style for Students ...
Part of why subject/verb agreement errors are so numerous is because of the "special cases" that often arise in English, e.g., when words...
Read more >Speech Recognition Grammar Specification Version 1.0 - W3C
The Speech Recognition Grammar Specification provides syntactic support for limited semantic interpretation.
Read more >Top 20 Errors in Undergraduate Writing
Summary and examples of the top 20 errors in undergraduate writing as found by Lunsford and Lunsford.
Read more >ANTLR 4 - Grammar Rule for string to support whitespace and ...
1 Answer 1 ... and here his solution : You are declaring your rule for string as a parser rule. Lexer rules should...
Read more >Common Grammar Mistakes: 11 Goofs You Might Know Too ...
I have tested emails in Gmail and several other email programs, plus every major feed reader and everything looks great. Sorry it's not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tangyang9464 can we support
in
in Java? See: https://casbin.org/docs/en/syntax-for-models#expression-evaluator . Java uses: https://github.com/killme2008/aviatorscript as the expression evaluator. Andaviatorscript
is evolving faster now. We should send issue to their community forin
support.🎉 This issue has been resolved in version 1.13.0 🎉
The release is available on:
v1.13.0
Your semantic-release bot 📦🚀