commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jexl/src/java/org/apache/commons/jexl/parser Parser.jjt
Date Sat, 25 May 2002 18:38:44 GMT
geirm       02/05/25 11:38:44

  Modified:    jexl/src/java/org/apache/commons/jexl/parser Parser.jjt
  Log:
  Fixed to support
  
     foo.0  (to imagine that as a syntax... :)
  
     foo[1][2] (multi-dim array access)
  
     foo_bar  (underscores in identifiers)
  
  Revision  Changes    Path
  1.2       +4 -4      jakarta-commons-sandbox/jexl/src/java/org/apache/commons/jexl/parser/Parser.jjt
  
  Index: Parser.jjt
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jexl/src/java/org/apache/commons/jexl/parser/Parser.jjt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Parser.jjt	26 Apr 2002 04:23:14 -0000	1.1
  +++ Parser.jjt	25 May 2002 18:38:44 -0000	1.2
  @@ -56,7 +56,7 @@
    *  Jexl : Java Expression Language
    *
    *  @author <a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a>
  - *  @version $Id: Parser.jjt,v 1.1 2002/04/26 04:23:14 geirm Exp $
  + *  @version $Id: Parser.jjt,v 1.2 2002/05/25 18:38:44 geirm Exp $
    */
   
   options
  @@ -445,13 +445,13 @@
   
   void ArrayAccess() : {}
   {
  -    Identifier() "[" ( LOOKAHEAD(3) Expression() | IntegerLiteral() | Reference() ) "]"
  +    Identifier() ("[" ( LOOKAHEAD(3) Expression() | IntegerLiteral() | Reference() ) "]")+
   }
   
   void Reference() : {}
   {
     (LOOKAHEAD(Identifier() "[" ( Expression() | IntegerLiteral() | Reference()) "]") ArrayAccess()
| Identifier())
  - (LOOKAHEAD(2) "." (LOOKAHEAD(3) Method() | Identifier() ))*
  +  (LOOKAHEAD(2) "." (LOOKAHEAD(3) Method() | Identifier() | IntegerLiteral() ))*
   }
   
   
  @@ -464,7 +464,7 @@
   {
     < IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>)* >
   |
  -  < #LETTER: [ "a"-"z", "A"-"Z" ] >
  +  < #LETTER: [ "a"-"z", "A"-"Z", "_", "$" ] >
   |
     < #DIGIT: [ "0"-"9"] >
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message