jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ari...@apache.org
Subject cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/parser ELParser.java
Date Mon, 01 Apr 2002 16:03:33 GMT
arista      02/04/01 08:03:33

  Modified:    standard/src/org/apache/taglibs/standard/lang/jstl
                        ELParser.jj
               standard/src/org/apache/taglibs/standard/lang/jstl/parser
                        ELParser.java
  Log:
  Bug 7658 - EL should not recognize quoted identifiers
  
  Fixed by removing support for quoted identifiers
  
  Revision  Changes    Path
  1.6       +1 -5      jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ELParser.jj
  
  Index: ELParser.jj
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ELParser.jj,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ELParser.jj	20 Mar 2002 13:51:59 -0000	1.5
  +++ ELParser.jj	1 Apr 2002 16:03:33 -0000	1.6
  @@ -615,11 +615,7 @@
   }
   {
     <DOT> 
  -     (property = Identifier ()
  -      |
  -      t = <STRING_LITERAL> 
  -       { property = StringLiteral.getValueFromToken (t.image); }
  -      )
  +     (property = Identifier ())
   
       {
         return new PropertySuffix (property);
  
  
  
  1.5       +15 -34    jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/parser/ELParser.java
  
  Index: ELParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/parser/ELParser.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ELParser.java	20 Mar 2002 13:51:59 -0000	1.4
  +++ ELParser.java	1 Apr 2002 16:03:33 -0000	1.5
  @@ -628,26 +628,7 @@
     Token t;
     String property;
       jj_consume_token(DOT);
  -    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  -    case PAGE_CONTEXT:
  -    case PAGE:
  -    case REQUEST:
  -    case SESSION:
  -    case APPLICATION:
  -    case PARAM:
  -    case PARAMS:
  -    case IDENTIFIER:
  -      property = Identifier();
  -      break;
  -    case STRING_LITERAL:
  -      t = jj_consume_token(STRING_LITERAL);
  -         property = StringLiteral.getValueFromToken (t.image);
  -      break;
  -    default:
  -      jj_la1[24] = jj_gen;
  -      jj_consume_token(-1);
  -      throw new ParseException();
  -    }
  +    property = Identifier();
         {if (true) return new PropertySuffix (property);}
       throw new Error("Missing return statement in function");
     }
  @@ -681,7 +662,7 @@
         ret = NullLiteral();
         break;
       default:
  -      jj_la1[25] = jj_gen;
  +      jj_la1[24] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
  @@ -700,7 +681,7 @@
                 {if (true) return BooleanLiteral.FALSE;}
         break;
       default:
  -      jj_la1[26] = jj_gen;
  +      jj_la1[25] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
  @@ -762,7 +743,7 @@
         t = jj_consume_token(PARAMS);
         break;
       default:
  -      jj_la1[27] = jj_gen;
  +      jj_la1[26] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
  @@ -801,7 +782,7 @@
                  {if (true) return ImplicitObject.PARAMS;}
         break;
       default:
  -      jj_la1[28] = jj_gen;
  +      jj_la1[27] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
  @@ -813,9 +794,9 @@
     public Token token, jj_nt;
     private int jj_ntk;
     private int jj_gen;
  -  final private int[] jj_la1 = new int[29];
  -  final private int[] jj_la1_0 = {0x6,0x6,0x6,0x0,0x0,0x4200000,0x4200000,0x3de0000,0x180000,0x60000,0x3000000,0xc00000,0x3de0000,0x80000000,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x20010000,0x8007580,0x20010000,0x400,0x7580,0x3000,0x0,0x0,};
  -  final private int[] jj_la1_1 = {0x0,0x0,0x0,0x100,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x3e,0xc,0x30,0x3e,0x41,0x41,0x0,0x1fe00,0x0,0x1fe00,0x0,0x0,0x1fe00,0xfe00,};
  +  final private int[] jj_la1 = new int[28];
  +  final private int[] jj_la1_0 = {0x6,0x6,0x6,0x0,0x0,0x4200000,0x4200000,0x3de0000,0x180000,0x60000,0x3000000,0xc00000,0x3de0000,0x80000000,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x20010000,0x8007580,0x20010000,0x7580,0x3000,0x0,0x0,};
  +  final private int[] jj_la1_1 = {0x0,0x0,0x0,0x100,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x3e,0xc,0x30,0x3e,0x41,0x41,0x0,0x1fe00,0x0,0x0,0x0,0x1fe00,0xfe00,};
   
     public ELParser(java.io.InputStream stream) {
       jj_input_stream = new JavaCharStream(stream, 1, 1);
  @@ -823,7 +804,7 @@
       token = new Token();
       jj_ntk = -1;
       jj_gen = 0;
  -    for (int i = 0; i < 29; i++) jj_la1[i] = -1;
  +    for (int i = 0; i < 28; i++) jj_la1[i] = -1;
     }
   
     public void ReInit(java.io.InputStream stream) {
  @@ -832,7 +813,7 @@
       token = new Token();
       jj_ntk = -1;
       jj_gen = 0;
  -    for (int i = 0; i < 29; i++) jj_la1[i] = -1;
  +    for (int i = 0; i < 28; i++) jj_la1[i] = -1;
     }
   
     public ELParser(java.io.Reader stream) {
  @@ -841,7 +822,7 @@
       token = new Token();
       jj_ntk = -1;
       jj_gen = 0;
  -    for (int i = 0; i < 29; i++) jj_la1[i] = -1;
  +    for (int i = 0; i < 28; i++) jj_la1[i] = -1;
     }
   
     public void ReInit(java.io.Reader stream) {
  @@ -850,7 +831,7 @@
       token = new Token();
       jj_ntk = -1;
       jj_gen = 0;
  -    for (int i = 0; i < 29; i++) jj_la1[i] = -1;
  +    for (int i = 0; i < 28; i++) jj_la1[i] = -1;
     }
   
     public ELParser(ELParserTokenManager tm) {
  @@ -858,7 +839,7 @@
       token = new Token();
       jj_ntk = -1;
       jj_gen = 0;
  -    for (int i = 0; i < 29; i++) jj_la1[i] = -1;
  +    for (int i = 0; i < 28; i++) jj_la1[i] = -1;
     }
   
     public void ReInit(ELParserTokenManager tm) {
  @@ -866,7 +847,7 @@
       token = new Token();
       jj_ntk = -1;
       jj_gen = 0;
  -    for (int i = 0; i < 29; i++) jj_la1[i] = -1;
  +    for (int i = 0; i < 28; i++) jj_la1[i] = -1;
     }
   
     final private Token jj_consume_token(int kind) throws ParseException {
  @@ -921,7 +902,7 @@
         la1tokens[jj_kind] = true;
         jj_kind = -1;
       }
  -    for (int i = 0; i < 29; i++) {
  +    for (int i = 0; i < 28; i++) {
         if (jj_la1[i] == jj_gen) {
           for (int j = 0; j < 32; j++) {
             if ((jj_la1_0[i] & (1<<j)) != 0) {
  
  
  

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


Mime
View raw message