You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by rl...@apache.org on 2003/09/29 06:19:37 UTC
cvs commit: jakarta-struts/src/share/org/apache/struts/validator/validwhen ValidWhen.java ValidWhenLexer.java ValidWhenParser.g ValidWhenParser.java ValidWhenParserTokenTypes.java ValidWhenParserTokenTypes.txt
rleland 2003/09/28 21:19:37
Modified: src/share/org/apache/struts/validator/validwhen
ValidWhen.java ValidWhenLexer.java
ValidWhenParser.g ValidWhenParser.java
ValidWhenParserTokenTypes.java
ValidWhenParserTokenTypes.txt
Log:
Update validator methods in ValidWhenparser.g
also update Apache license, to correct version.
== Regenerate these files with ANTLR 2.7.2 & not 2.7.1 ==
The only observed difference is that ignoring case boolean operators
are moved up sooner in method calls.
Revision Changes Path
1.9 +21 -20 jakarta-struts/src/share/org/apache/struts/validator/validwhen/ValidWhen.java
Index: ValidWhen.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/validator/validwhen/ValidWhen.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ValidWhen.java 26 Sep 2003 18:12:24 -0000 1.8
+++ ValidWhen.java 29 Sep 2003 04:19:37 -0000 1.9
@@ -23,20 +23,20 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Struts", and "Apache Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
+ * any, must include the following acknowledgement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Struts", and "Apache Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -56,6 +56,7 @@
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
+ *
*/
package org.apache.struts.validator.validwhen;
@@ -67,7 +68,7 @@
import org.apache.commons.validator.Field;
import org.apache.commons.validator.Validator;
import org.apache.commons.validator.ValidatorAction;
-import org.apache.commons.validator.ValidatorUtil;
+import org.apache.commons.validator.util.ValidatorUtils;
import org.apache.struts.action.ActionMessages;
import org.apache.struts.validator.Resources;
@@ -115,7 +116,7 @@
Validator validator,
HttpServletRequest request) {
- Object form = validator.getResource(Validator.BEAN_KEY);
+ Object form = validator.getParameterValue(Validator.BEAN_PARAM);
String value = null;
boolean valid = false;
int index = -1;
@@ -135,7 +136,7 @@
if (isString(bean)) {
value = (String) bean;
} else {
- value = ValidatorUtil.getValueAsString(bean, field.getProperty());
+ value = ValidatorUtils.getValueAsString(bean, field.getProperty());
}
String test = field.getVarValue("test");
1.5 +65 -33 jakarta-struts/src/share/org/apache/struts/validator/validwhen/ValidWhenLexer.java
Index: ValidWhenLexer.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/validator/validwhen/ValidWhenLexer.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ValidWhenLexer.java 27 Jul 2003 05:20:44 -0000 1.4
+++ ValidWhenLexer.java 29 Sep 2003 04:19:37 -0000 1.5
@@ -1,9 +1,15 @@
-// $ANTLR 2.7.1: "ValidWhenParser.g" -> "ValidWhenLexer.java"$
+// $ANTLR 2.7.2: "validWhenParser.g" -> "ValidWhenLexer.java"$
/*
+ * $Header$
+ * $Revision$
+ * $Date$
+ *
+ * ====================================================================
+ *
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -19,20 +25,20 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Struts", and "Apache Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
+ * any, must include the following acknowledgement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Struts", and "Apache Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -52,10 +58,14 @@
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
+ *
*/
package org.apache.struts.validator.validwhen;
+import java.util.Stack;
+import org.apache.commons.validator.util.ValidatorUtils;
+
import java.io.InputStream;
import antlr.TokenStreamException;
@@ -63,18 +73,23 @@
import antlr.TokenStreamRecognitionException;
import antlr.CharStreamException;
import antlr.CharStreamIOException;
+import antlr.ANTLRException;
import java.io.Reader;
import java.util.Hashtable;
+import antlr.CharScanner;
import antlr.InputBuffer;
import antlr.ByteBuffer;
import antlr.CharBuffer;
import antlr.Token;
+import antlr.CommonToken;
import antlr.RecognitionException;
import antlr.NoViableAltForCharException;
+import antlr.MismatchedCharException;
import antlr.TokenStream;
import antlr.ANTLRHashString;
import antlr.LexerSharedInputState;
import antlr.collections.impl.BitSet;
+import antlr.SemanticException;
public class ValidWhenLexer extends antlr.CharScanner implements ValidWhenParserTokenTypes, TokenStream
{
@@ -89,18 +104,19 @@
}
public ValidWhenLexer(LexerSharedInputState state) {
super(state);
+ caseSensitiveLiterals = true;
+ setCaseSensitive(false);
literals = new Hashtable();
literals.put(new ANTLRHashString("null", this), new Integer(11));
literals.put(new ANTLRHashString("or", this), new Integer(16));
literals.put(new ANTLRHashString("and", this), new Integer(15));
-caseSensitiveLiterals = true;
-setCaseSensitive(false);
}
public Token nextToken() throws TokenStreamException {
Token theRetToken=null;
tryAgain:
for (;;) {
+ Token _token = null;
int _ttype = Token.INVALID_TYPE;
resetText();
try { // for char stream error handling
@@ -207,7 +223,7 @@
}
else {
if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
- else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine());}
+ else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
}
if ( _returnToken==null ) continue tryAgain; // found SKIP token
@@ -234,7 +250,8 @@
public final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = WS;
-
+ int _saveIndex;
+
{
int _cnt15=0;
_loop15:
@@ -262,7 +279,7 @@
}
default:
{
- if ( _cnt15>=1 ) { break _loop15; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine());}
+ if ( _cnt15>=1 ) { break _loop15; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
}
_cnt15++;
@@ -306,6 +323,7 @@
public final void mHEX_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = HEX_LITERAL;
+ int _saveIndex;
match('0');
match('x');
@@ -329,7 +347,7 @@
}
default:
{
- if ( _cnt22>=1 ) { break _loop22; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine());}
+ if ( _cnt22>=1 ) { break _loop22; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
}
_cnt22++;
@@ -356,7 +374,7 @@
matchRange('0','7');
}
else {
- if ( _cnt25>=1 ) { break _loop25; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine());}
+ if ( _cnt25>=1 ) { break _loop25; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt25++;
@@ -387,7 +405,7 @@
matchNot('\'');
}
else {
- if ( _cnt29>=1 ) { break _loop29; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine());}
+ if ( _cnt29>=1 ) { break _loop29; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt29++;
@@ -409,7 +427,7 @@
matchNot('\"');
}
else {
- if ( _cnt32>=1 ) { break _loop32; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine());}
+ if ( _cnt32>=1 ) { break _loop32; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
_cnt32++;
@@ -421,7 +439,7 @@
}
default:
{
- throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine());
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
@@ -486,6 +504,7 @@
public final void mTHIS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = THIS;
+ int _saveIndex;
match("*this*");
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
@@ -498,7 +517,8 @@
public final void mIDENTIFIER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = IDENTIFIER;
-
+ int _saveIndex;
+
{
switch ( LA(1)) {
case 'a': case 'b': case 'c': case 'd':
@@ -519,7 +539,7 @@
}
default:
{
- throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine());
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
}
}
}
@@ -553,7 +573,7 @@
}
default:
{
- if ( _cnt41>=1 ) { break _loop41; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine());}
+ if ( _cnt41>=1 ) { break _loop41; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
}
}
_cnt41++;
@@ -569,6 +589,7 @@
public final void mEQUALSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = EQUALSIGN;
+ int _saveIndex;
match('=');
match('=');
@@ -582,6 +603,7 @@
public final void mNOTEQUALSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = NOTEQUALSIGN;
+ int _saveIndex;
match('!');
match('=');
@@ -595,6 +617,7 @@
public final void mLESSTHANSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LESSTHANSIGN;
+ int _saveIndex;
match('<');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
@@ -607,6 +630,7 @@
public final void mGREATERTHANSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = GREATERTHANSIGN;
+ int _saveIndex;
match('>');
if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
@@ -619,6 +643,7 @@
public final void mLESSEQUALSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = LESSEQUALSIGN;
+ int _saveIndex;
match('<');
match('=');
@@ -632,6 +657,7 @@
public final void mGREATEREQUALSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype; Token _token=null; int _begin=text.length();
_ttype = GREATEREQUALSIGN;
+ int _saveIndex;
match('>');
match('=');
@@ -643,9 +669,15 @@
}
- private static final long _tokenSet_0_data_[] = { 8358477528813282816L, 576460744384577536L, 0L, 0L };
- public static final BitSet _tokenSet_0 = new BitSet(_tokenSet_0_data_);
- private static final long _tokenSet_1_data_[] = { 8358478061389227520L, 576460744384577536L, 0L, 0L };
- public static final BitSet _tokenSet_1 = new BitSet(_tokenSet_1_data_);
+ private static final long[] mk_tokenSet_0() {
+ long[] data = { 8358477528813282816L, 576460744384577536L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
+ private static final long[] mk_tokenSet_1() {
+ long[] data = { 8358478061389227520L, 576460744384577536L, 0L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
}
1.4 +28 -21 jakarta-struts/src/share/org/apache/struts/validator/validwhen/ValidWhenParser.g
Index: ValidWhenParser.g
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/validator/validwhen/ValidWhenParser.g,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ValidWhenParser.g 1 Jul 2003 17:49:25 -0000 1.3
+++ ValidWhenParser.g 29 Sep 2003 04:19:37 -0000 1.4
@@ -1,8 +1,14 @@
header {
/*
+ * $Header$
+ * $Revision$
+ * $Date$
+ *
+ * ====================================================================
+ *
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -18,20 +24,20 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Struts", and "Apache Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
+ * any, must include the following acknowledgement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Struts", and "Apache Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -51,12 +57,13 @@
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
+ *
*/
package org.apache.struts.validator.validwhen;
import java.util.Stack;
-import org.apache.commons.validator.ValidatorUtil;
+import org.apache.commons.validator.util.ValidatorUtils;
}
class ValidWhenParser extends Parser;
@@ -203,26 +210,26 @@
: identifier LBRACKET RBRACKET identifier {
Object i2 = argStack.pop();
Object i1 = argStack.pop();
- argStack.push(ValidatorUtil.getValueAsString(form, i1 + "[" + index + "]" + i2));
+ argStack.push(ValidatorUtils.getValueAsString(form, i1 + "[" + index + "]" + i2));
}
| identifier LBRACKET integer RBRACKET identifier {
Object i5 = argStack.pop();
Object i4 = argStack.pop();
Object i3 = argStack.pop();
- argStack.push(ValidatorUtil.getValueAsString(form, i3 + "[" + i4 + "]" + i5));
+ argStack.push(ValidatorUtils.getValueAsString(form, i3 + "[" + i4 + "]" + i5));
}
| identifier LBRACKET integer RBRACKET LBRACKET {
Object i7 = argStack.pop();
Object i6 = argStack.pop();
- argStack.push(ValidatorUtil.getValueAsString(form, i6 + "[" + i7 + "]"));
+ argStack.push(ValidatorUtils.getValueAsString(form, i6 + "[" + i7 + "]"));
}
| identifier LBRACKET RBRACKET {
Object i8 = argStack.pop();
- argStack.push(ValidatorUtil.getValueAsString(form, i8 + "[" + index + "]"));
+ argStack.push(ValidatorUtils.getValueAsString(form, i8 + "[" + index + "]"));
}
| identifier {
Object i9 = argStack.pop();
- argStack.push(ValidatorUtil.getValueAsString(form, (String)i9));
+ argStack.push(ValidatorUtils.getValueAsString(form, (String)i9));
}
;
1.6 +40 -31 jakarta-struts/src/share/org/apache/struts/validator/validwhen/ValidWhenParser.java
Index: ValidWhenParser.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/validator/validwhen/ValidWhenParser.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ValidWhenParser.java 1 Jul 2003 17:49:25 -0000 1.5
+++ ValidWhenParser.java 29 Sep 2003 04:19:37 -0000 1.6
@@ -1,9 +1,15 @@
-// $ANTLR 2.7.1: "ValidWhenParser.g" -> "ValidWhenParser.java"$
+// $ANTLR 2.7.2: "validWhenParser.g" -> "ValidWhenParser.java"$
/*
+ * $Header$
+ * $Revision$
+ * $Date$
+ *
+ * ====================================================================
+ *
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -19,20 +25,20 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Struts", and "Apache Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
+ * any, must include the following acknowledgement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Struts", and "Apache Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -52,12 +58,13 @@
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
+ *
*/
package org.apache.struts.validator.validwhen;
import java.util.Stack;
-import org.apache.commons.validator.ValidatorUtil;
+import org.apache.commons.validator.util.ValidatorUtils;
import antlr.TokenBuffer;
@@ -73,12 +80,8 @@
import antlr.SemanticException;
import antlr.ParserSharedInputState;
import antlr.collections.impl.BitSet;
-import antlr.collections.AST;
-import antlr.ASTPair;
-import antlr.collections.impl.ASTArray;
-public class ValidWhenParser extends antlr.LLkParser
- implements ValidWhenParserTokenTypes
+public class ValidWhenParser extends antlr.LLkParser implements ValidWhenParserTokenTypes
{
Stack argStack = new Stack();
Object form;
@@ -290,7 +293,7 @@
Object i2 = argStack.pop();
Object i1 = argStack.pop();
- argStack.push(ValidatorUtil.getValueAsString(form, i1 + "[" + index + "]" + i2));
+ argStack.push(ValidatorUtils.getValueAsString(form, i1 + "[" + index + "]" + i2));
}
else if ((LA(1)==IDENTIFIER) && (LA(2)==LBRACKET) && ((LA(3) >= DECIMAL_LITERAL && LA(3) <= OCTAL_LITERAL)) && (LA(4)==RBRACKET) && (LA(5)==IDENTIFIER)) {
@@ -303,7 +306,7 @@
Object i5 = argStack.pop();
Object i4 = argStack.pop();
Object i3 = argStack.pop();
- argStack.push(ValidatorUtil.getValueAsString(form, i3 + "[" + i4 + "]" + i5));
+ argStack.push(ValidatorUtils.getValueAsString(form, i3 + "[" + i4 + "]" + i5));
}
else if ((LA(1)==IDENTIFIER) && (LA(2)==LBRACKET) && ((LA(3) >= DECIMAL_LITERAL && LA(3) <= OCTAL_LITERAL)) && (LA(4)==RBRACKET) && (LA(5)==LBRACKET)) {
@@ -315,7 +318,7 @@
Object i7 = argStack.pop();
Object i6 = argStack.pop();
- argStack.push(ValidatorUtil.getValueAsString(form, i6 + "[" + i7 + "]"));
+ argStack.push(ValidatorUtils.getValueAsString(form, i6 + "[" + i7 + "]"));
}
else if ((LA(1)==IDENTIFIER) && (LA(2)==LBRACKET) && (LA(3)==RBRACKET) && (_tokenSet_0.member(LA(4)))) {
@@ -324,14 +327,14 @@
match(RBRACKET);
Object i8 = argStack.pop();
- argStack.push(ValidatorUtil.getValueAsString(form, i8 + "[" + index + "]"));
+ argStack.push(ValidatorUtils.getValueAsString(form, i8 + "[" + index + "]"));
}
else if ((LA(1)==IDENTIFIER) && (_tokenSet_0.member(LA(2)))) {
identifier();
Object i9 = argStack.pop();
- argStack.push(ValidatorUtil.getValueAsString(form, (String)i9));
+ argStack.push(ValidatorUtils.getValueAsString(form, (String)i9));
}
else {
@@ -557,9 +560,15 @@
"WS"
};
- private static final long _tokenSet_0_data_[] = { 8273920L, 0L };
- public static final BitSet _tokenSet_0 = new BitSet(_tokenSet_0_data_);
- private static final long _tokenSet_1_data_[] = { 6640L, 0L };
- public static final BitSet _tokenSet_1 = new BitSet(_tokenSet_1_data_);
+ private static final long[] mk_tokenSet_0() {
+ long[] data = { 8273920L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
+ private static final long[] mk_tokenSet_1() {
+ long[] data = { 6640L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
}
1.4 +24 -17 jakarta-struts/src/share/org/apache/struts/validator/validwhen/ValidWhenParserTokenTypes.java
Index: ValidWhenParserTokenTypes.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/validator/validwhen/ValidWhenParserTokenTypes.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ValidWhenParserTokenTypes.java 1 Jul 2003 17:49:25 -0000 1.3
+++ ValidWhenParserTokenTypes.java 29 Sep 2003 04:19:37 -0000 1.4
@@ -1,9 +1,15 @@
-// $ANTLR 2.7.1: "ValidWhenParser.g" -> "ValidWhenParser.java"$
+// $ANTLR 2.7.2: "validWhenParser.g" -> "ValidWhenParser.java"$
/*
+ * $Header$
+ * $Revision$
+ * $Date$
+ *
+ * ====================================================================
+ *
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -19,20 +25,20 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Struts", and "Apache Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
+ * any, must include the following acknowledgement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Struts", and "Apache Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -52,12 +58,13 @@
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
+ *
*/
package org.apache.struts.validator.validwhen;
import java.util.Stack;
-import org.apache.commons.validator.ValidatorUtil;
+import org.apache.commons.validator.util.ValidatorUtils;
public interface ValidWhenParserTokenTypes {
1.4 +1 -1 jakarta-struts/src/share/org/apache/struts/validator/validwhen/ValidWhenParserTokenTypes.txt
Index: ValidWhenParserTokenTypes.txt
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/validator/validwhen/ValidWhenParserTokenTypes.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ValidWhenParserTokenTypes.txt 1 Jul 2003 17:49:25 -0000 1.3
+++ ValidWhenParserTokenTypes.txt 29 Sep 2003 04:19:37 -0000 1.4
@@ -1,4 +1,4 @@
-// $ANTLR 2.7.1: ValidWhenParser.g -> ValidWhenParserTokenTypes.txt$
+// $ANTLR 2.7.2: validWhenParser.g -> ValidWhenParserTokenTypes.txt$
ValidWhenParser // output token vocab name
DECIMAL_LITERAL=4
HEX_LITERAL=5
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org