You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hivemind.apache.org by hl...@apache.org on 2004/07/17 01:14:32 UTC
cvs commit: jakarta-hivemind/framework/src/javacc SimpleDataLanguageParser.jj
hlship 2004/07/16 16:14:32
Modified: framework/src/javacc SimpleDataLanguageParser.jj
Log:
Allow unquoted attribute values to contain colons.
Revision Changes Path
1.4 +8 -4 jakarta-hivemind/framework/src/javacc/SimpleDataLanguageParser.jj
Index: SimpleDataLanguageParser.jj
===================================================================
RCS file: /home/cvs/jakarta-hivemind/framework/src/javacc/SimpleDataLanguageParser.jj,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SimpleDataLanguageParser.jj 25 Jun 2004 20:30:18 -0000 1.3
+++ SimpleDataLanguageParser.jj 16 Jul 2004 23:14:32 -0000 1.4
@@ -193,8 +193,8 @@
< NUMERIC_LITERAL: (<SIGN>)? ( ((<DIGIT>)+ (<DOT>)?) | ((<DIGIT>)* <DOT> (<DIGIT>)+) ) >
| < SIMPLE_ID: ["a" - "z", "A" - "Z", "_"] ( [ "a" - "z", "A" - "Z", "0" - "9", "_", "-"] )* >
-| < COMPLEX_ID: <SIMPLE_ID> ( <DOT> <SIMPLE_ID> )*>
-
+| < COMPLEX_ID: <SIMPLE_ID> ( <DOT> <SIMPLE_ID> )* >
+| < SEGMENTED_ID: <COMPLEX_ID> ( <COLON> <COMPLEX_ID> )* >
| < QUOTED_LITERAL: <QUOTE> ((~["\""]) | ("\\" ["\"", "\\", "n", "r", "t"]))* <QUOTE> >
@@ -213,6 +213,7 @@
| < EQ: "=" >
| < #QUOTE: "\"" >
| < #DOT: "." >
+| < #COLON: ":" >
}
SKIP:
@@ -307,7 +308,10 @@
void attribute_value(String attributeName, AttributesImpl attributes) : {}
{
- ( <NUMERIC_LITERAL> | <SIMPLE_ID> | <COMPLEX_ID> | <SYMBOL>) { addAttribute(attributes, attributeName, token.image); }
+ // Because of matching rules I just don't understand, it is not possible to
+ // create an ATTRIBUTE_VALUE token for this list of possible values.
+
+ ( <NUMERIC_LITERAL> | <SIMPLE_ID> | <COMPLEX_ID> | <SEGMENTED_ID> | <SYMBOL> ) { addAttribute(attributes, attributeName, token.image); }
| <QUOTED_LITERAL> { addAttribute(attributes, attributeName, unquote(token.image)); }
| <EXTENDED_LITERAL> { addAttribute(attributes, attributeName, defang(token.image)); }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-cvs-help@jakarta.apache.org