parboiled2 icon indicating copy to clipboard operation
parboiled2 copied to clipboard

"capture" listed as expected rule / token

Open JuPfu opened this issue 9 years ago • 0 comments

Validation of the following triple with Cheló̱na (https://github.com/JuPfu/chelona) , a Parboiled2 based Scala Parser for the W3C RDF 1.1 Turtle Language

http://www.w3.org/2013/TurtleTests/s http://www.w3.org/2013/TurtleTests/p 123.abc .

results in the following error message, which also lists "capture" as expected rule / token:

Validate: TurtleTests/turtle-syntax-bad-num-01.ttl File 'TurtleTests/turtle-syntax-bad-num-01.ttl': Invalid input "abc ", expected capture, statement or 'EOI' (line 1, column 83): http://www.w3.org/2013/TurtleTests/s http://www.w3.org/2013/TurtleTests/p 123.abc .

16 rules mismatched at error location: ... +:-4 /object/ |:-4 /literal/ |:-4 /numericLiteral/ |:-4 /DOUBLE/ atomic:-4 / capture:-4 / |:-4 / * / Digit:<CharPredicate> ...43 /po/ /objectList/ +:-4 /object/ |:-4 /literal/ |:-4 /numericLiteral/ |:-4 /DOUBLE/ atomic:-4 / capture:-4 /EXPONENT/ 'e' ...tList/ +:-4 /object/ |:-4 /literal/ |:-4 /numericLiteral/ |:-4 /DECIMAL/ atomic:-4 / capture:-4 / + / Digit:<CharPredicate> /turtleDoc/ *:-82 /statement/ | /directive/ | /sparqlPrefix/ cut / atomic / "prefix" / 'p' /turtleDoc/ *:-82 /statement/ | /directive/ | /sparqlBase/ cut / atomic / "base" / 'b' /turtleDoc/ *:-82 /statement/ | /triples/ | /subject/ | /iri/ | /IRIREF/ atomic / '<' ...ect/ | /iri/ | /prefixedName/ | /PNAME_LN/ /PNAME_NS/ ? /PN_PREFIX/ atomic / capture / *:1 / |:3 / PN_CHARS:<CharPredicate> .../iri/ | /prefixedName/ | /PNAME_LN/ /PNAME_NS/ ? /PN_PREFIX/ atomic / capture / *:1 / |:3 / &:3 / +:3 / DOT:<CharPredicate> .../iri/ | /prefixedName/ | /PNAME_LN/ /PNAME_NS/ ? /PN_PREFIX/ atomic / capture / *:1 / |:3 / isHighSurrogate:<CharPredicate> /turtleDoc/ *:-82 /statement/ | /triples/ | /subject/ | /iri/ | /prefixedName/ | /PNAME_LN/ /PNAME_NS/ ':' ...es/ | /subject/ | /iri/ | /prefixedName/ | /PNAME_NS/ ? /PN_PREFIX/ atomic / capture / *:1 / |:3 / PN_CHARS:<CharPredicate> ...subject/ | /iri/ | /prefixedName/ | /PNAME_NS/ ? /PN_PREFIX/ atomic / capture / *:1 / |:3 / &:3 / +:3 / DOT:<CharPredicate> ...subject/ | /iri/ | /prefixedName/ | /PNAME_NS/ ? /PN_PREFIX/ atomic / capture / *:1 / |:3 / isHighSurrogate:<CharPredicate> /turtleDoc/ *:-82 /statement/ | /triples/ | /subject/ | /iri/ | /prefixedName/ | /PNAME_NS/ ':' /turtleDoc/ *:-82 /statement/ | /triples/ | /subject/ | /blankNode/ | /BLANK_NODE_LABEL/ atomic / ":" / '' /turtleDoc/ 'EOI'

The error message is emitted by

case Failure(e: ParseError) ⇒ System.err.println("File '" + file.head + "': " + parser.formatError(e, new ErrorFormatter(showTraces = true)))

JuPfu avatar May 18 '15 22:05 JuPfu