Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @prefix my: <http://test/dream#> .
- # This is sample file of Jena rules. It tests the rule parser which currently fails on some single-char strings (the open parenthesis and the comma).
- # An error mention above a line of code means: when this line of code is outcommented then the error disappears.
- # Note also the influence of quotes type (double or single).
- # Rules including string "("
- # ok
- [ -> print('test jena!') ]
- # FAIL: org.apache.jena.reasoner.rulesys.Rule$ParserException: Expected ')' at end of clause, found ]
- [(?a my:text "(") -> ]
- # FAIL: org.apache.jena.reasoner.rulesys.Rule$ParserException: Malformed rule
- -> print("(").
- # FAIL [before]: org.apache.jena.reasoner.rulesys.Rule$ParserException: Expected ')' at end of clause, found [
- # FAIL [now]: org.apache.jena.reasoner.rulesys.Rule$ParserException: Malformed rule
- -> print('(').
- # FAIL: org.apache.jena.reasoner.rulesys.Rule$ParserException: Malformed rule
- [ -> print('(') ]
- # ok (different char: closing parenthesis)
- -> print(')') .
- # Rules including string ","
- # FAIL: org.apache.jena.reasoner.rulesys.Rule$ParserException: Malformed rule
- -> print(",").
- # ok (note the different quotes)
- -> print(',').
- # Rules including other single-character strings (no problems here)
- # ok
- -> print(".").
- # ok
- -> print("->").
- # ok
- -> print("[").
- # ok
- -> print("]").
- # ok
- -> print(":").
- # ok
- -> print("?").
- # ok
- -> print("<<").
Advertisement
Add Comment
Please, Sign In to add comment