--- a/rdf-turtle/turtle.bnf Mon Aug 15 23:08:51 2011 +0200
+++ b/rdf-turtle/turtle.bnf Tue Aug 16 11:28:06 2011 -0700
@@ -1,63 +1,150 @@
-[1] turtleDoc ::= statement*
-[2] statement ::= directive '.' | triples '.'
-[3] directive ::= prefixID | base
-[4] prefixID ::= PREFIX PNAME_NS IRI_REF
-[5] base ::= BASE IRI_REF
-[6] triples ::= subject predicateObjectList
-[7] predicateObjectList ::= verb objectList ( ';' verb objectList )* ( ';')?
-[8] objectList ::= object ( ',' object)*
-[9] verb ::= predicate | 'a'
-[11] subject ::= IRIref | blank
-[12] predicate ::= IRIref
-[13] object ::= IRIref | blank | literal
-[14] literal ::= RDFLiteral | NumericLiteral | BooleanLiteral
-[21] blank ::= BlankNode | '[' predicateObjectList ']' | collection
-[23] collection ::= '(' object* ')'
-[60s] RDFLiteral ::= String ( LANGTAG | ( '^^' IRIref ) )?
-[61s] NumericLiteral ::= NumericLiteralUnsigned | NumericLiteralPositive | NumericLiteralNegative
-[62s] NumericLiteralUnsigned ::= INTEGER | DECIMAL | DOUBLE
-[63s] NumericLiteralPositive ::= INTEGER_POSITIVE | DECIMAL_POSITIVE | DOUBLE_POSITIVE
-[64s] NumericLiteralNegative ::= INTEGER_NEGATIVE | DECIMAL_NEGATIVE | DOUBLE_NEGATIVE
-[65s] BooleanLiteral ::= 'true' | 'false'
-[66s] String ::= STRING_LITERAL1 | STRING_LITERAL2 | STRING_LITERAL_LONG1 | STRING_LITERAL_LONG2
-[67s] IRIref ::= IRI_REF | PrefixedName
-[68s] PrefixedName ::= PNAME_LN | PNAME_NS
-[69s] BlankNode ::= BLANK_NODE_LABEL | ANON
+[1] turtleDoc ::= (statement)*
+
+[2] statement ::= directive "."
+ | triples "."
+[3] directive ::= prefixID
+ | base
+[4] prefixID ::= PREFIX PNAME_NS IRI_REF
+
+[5] base ::= BASE IRI_REF
+
+[6] triples ::= subject predicateObjectList
+
+[7] predicateObjectList ::= verb objectList ( ";" verb objectList )* (";")?
+
+[8] objectList ::= object ( "," object )*
+
+[9] verb ::= predicate
+ | "a"
+[10] subject ::= IRIref
+ | blank
+[11] predicate ::= IRIref
+
+[12] object ::= IRIref
+ | blank
+ | literal
+[13] literal ::= RDFLiteral
+ | NumericLiteral
+ | BooleanLiteral
+[14] blank ::= BlankNode
+ | blankNodePropertyList
+ | collection
+[15] blankNodePropertyList ::= "[" predicateObjectList "]"
+
+[16] collection ::= "(" object* ")"
+
+[60s] RDFLiteral ::= String ( LANGTAG | ( "^^" IRIref ) )?
+
+[61s] NumericLiteral ::= NumericLiteralUnsigned
+ | NumericLiteralPositive
+ | NumericLiteralNegative
+[62s] NumericLiteralUnsigned ::= INTEGER
+ | DECIMAL
+ | DOUBLE
+[63s] NumericLiteralPositive ::= INTEGER_POSITIVE
+ | DECIMAL_POSITIVE
+ | DOUBLE_POSITIVE
+[64s] NumericLiteralNegative ::= INTEGER_NEGATIVE
+ | DECIMAL_NEGATIVE
+ | DOUBLE_NEGATIVE
+[65s] BooleanLiteral ::= "true"
+ | "false"
+[66s] String ::= STRING_LITERAL1
+ | STRING_LITERAL2
+ | STRING_LITERAL_LONG1
+ | STRING_LITERAL_LONG2
+[67s] IRIref ::= IRI_REF
+ | PrefixedName
+[68s] PrefixedName ::= PNAME_LN
+ | PNAME_NS
+[69s] BlankNode ::= BLANK_NODE_LABEL
+ | ANON
@terminals
-[0] BASE ::= '@base'
-[0] PREFIX ::= '@prefix'
-[70s] IRI_REF ::= '<' ([^<>\"{}|^`\\]-[#x00-#x20])* '>'
-[71s] PNAME_NS ::= PN_PREFIX? ':'
-[72s] PNAME_LN ::= PNAME_NS PN_LOCAL
-[73s] BLANK_NODE_LABEL ::= '_:' PN_LOCAL
-[74s] VAR1 ::= '?' VARNAME
-[75s] VAR2 ::= '$' VARNAME
-[76s] LANGTAG ::= BASE | PREFIX | '@' [a-zA-Z]+ ('-' [a-zA-Z0-9]+)*
-[77s] INTEGER ::= [0-9]+
-[78s] DECIMAL ::= [0-9]+ '.' [0-9]* | '.' [0-9]+
-[79s] DOUBLE ::= [0-9]+ '.' [0-9]* EXPONENT | '.' ([0-9])+ EXPONENT | ([0-9])+ EXPONENT
-[80s] INTEGER_POSITIVE ::= '+' INTEGER
-[81s] DECIMAL_POSITIVE ::= '+' DECIMAL
-[82s] DOUBLE_POSITIVE ::= '+' DOUBLE
-[83s] INTEGER_NEGATIVE ::= '-' INTEGER
-[84s] DECIMAL_NEGATIVE ::= '-' DECIMAL
-[85s] DOUBLE_NEGATIVE ::= '-' DOUBLE
-[86s] EXPONENT ::= [eE] [+-]? [0-9]+
-[87s] STRING_LITERAL1 ::= "'" ( ([^#x27#x5C#xA#xD]) | ECHAR )* "'"
-[88s] STRING_LITERAL2 ::= '"' ( ([^#x22#x5C#xA#xD]) | ECHAR )* '"'
-[89s] STRING_LITERAL_LONG1 ::= "'''" ( ( "'" | "''" )? ( [^'\\] | ECHAR ) )* "'''"
-[90s] STRING_LITERAL_LONG2 ::= '"""' ( ( '"' | '""' )? ( [^"\\] | ECHAR ) )* '"""'
-[91s] ECHAR ::= '\\' [tbnrf\\"']
-[92s] NIL ::= '(' WS* ')'
-[93s] WS ::= #x20 | #x9 | #xD | #xA
-[94s] ANON ::= '[' WS* ']'
-[95s] PN_CHARS_BASE ::= [A-Z] | [a-z] | [#x00C0-#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x02FF] | [#x0370-#x037D] | [#x037F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
-[96s] PN_CHARS_U ::= PN_CHARS_BASE | '_'
-[97s] VARNAME ::= ( PN_CHARS_U | [0-9] ) ( PN_CHARS_U | [0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040] )*
-[98s] PN_CHARS ::= PN_CHARS_U | '-' | [0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040]
-[99s] PN_PREFIX ::= PN_CHARS_BASE ((PN_CHARS|'.')* PN_CHARS)?
-[100s] PN_LOCAL ::= ( PN_CHARS_U | [0-9] ) ((PN_CHARS|'.')* PN_CHARS)?
-@pass: [ \t\r\n]+ | '#' [^\r\n]*
-
+[17] BASE ::= "@base"
+
+[18] PREFIX ::= "@prefix"
+
+[70s] IRI_REF ::= "<" ( [^<>\"{}|^`\\] - [#0000- ] | UCHAR )* ">"
+
+[71s] PNAME_NS ::= (PN_PREFIX)? ":"
+
+[72s] PNAME_LN ::= PNAME_NS PN_LOCAL
+
+[73s] BLANK_NODE_LABEL ::= "_:" PN_LOCAL
+
+[76s] LANGTAG ::= BASE
+ | PREFIX
+ | "@" [a-zA-Z]+ ( "-" [a-zA-Z0-9]+ )*
+[77s] INTEGER ::= [0-9]+
+
+[78s] DECIMAL ::= [0-9]+ "." [0-9]+
+ | "." [0-9]+
+[79s] DOUBLE ::= [0-9]+ "." [0-9]+ EXPONENT
+ | "." ( [0-9] )+ EXPONENT
+ | ( [0-9] )+ EXPONENT
+[80s] INTEGER_POSITIVE ::= "+" INTEGER
+
+[81s] DECIMAL_POSITIVE ::= "+" DECIMAL
+
+[82s] DOUBLE_POSITIVE ::= "+" DOUBLE
+
+[83s] INTEGER_NEGATIVE ::= "-" INTEGER
+
+[84s] DECIMAL_NEGATIVE ::= "-" DECIMAL
+
+[85s] DOUBLE_NEGATIVE ::= "-" DOUBLE
+
+[86s] EXPONENT ::= [eE] [+-]? [0-9]+
+
+[87s] STRING_LITERAL1 ::= "'" ( ( [^'\\\n\r] ) | ECHAR | UCHAR )* "'"
+
+[88s] STRING_LITERAL2 ::= '"' ( ( [^\"\\\n\r] ) | ECHAR | UCHAR )* '"'
+
+[89s] STRING_LITERAL_LONG1 ::= "'''" ( ( "'" | "''" )? ( [^'\\] | ECHAR | UCHAR ) )* "'''"
+
+[90s] STRING_LITERAL_LONG2 ::= '"""' ( ( '"' | '""' )? ( [^\"\\] | ECHAR | UCHAR ) )* '"""'
+
+[19] UCHAR ::= ( "\\u" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] )
+ | ( "\\U" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]
+ [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] )
+[91s] ECHAR ::= "\\" [tbnrf\\\"']
+
+[92s] NIL ::= "(" (WS)* ")"
+
+[93s] WS ::= " "
+ | "\t"
+ | "\r"
+ | "\n"
+[94s] ANON ::= "[" (WS)* "]"
+
+[95s] PN_CHARS_BASE ::= [A-Z]
+ | [a-z]
+ | [#00C0-#00D6]
+ | [#00D8-#00F6]
+ | [#00F8-#02FF]
+ | [#0370-#037D]
+ | [#037F-#1FFF]
+ | [#200C-#200D]
+ | [#2070-#218F]
+ | [#2C00-#2FEF]
+ | [#3001-#D7FF]
+ | [#F900-#FDCF]
+ | [#FDF0-#FFFD]
+ | [#10000-#EFFFF]
+ | UCHAR
+[96s] PN_CHARS_U ::= PN_CHARS_BASE
+ | "_"
+[98s] PN_CHARS ::= PN_CHARS_U
+ | "-"
+ | [0-9]
+ | #00B7
+ | [#0300-#036F]
+ | [#203F-#2040]
+[99s] PN_PREFIX ::= PN_CHARS_BASE ( ( PN_CHARS | "." )* PN_CHARS )?
+
+[100s] PN_LOCAL ::= ( PN_CHARS_U | [0-9] ) ( ( PN_CHARS | "." )* PN_CHARS )?
+
+@pass ::= [ \t\r\n]+
+ | "#" [^\r\n]*
\ No newline at end of file