Author: julien_viet
Date: 2010-11-27 19:45:19 -0500 (Sat, 27 Nov 2010)
New Revision: 5318
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/regexp/RENode.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/regexp/RegExpParser.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/RegExpAnalyser.java
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/regexp/TestParser.java
Log:
minor rename
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/regexp/RENode.java
===================================================================
---
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/regexp/RENode.java 2010-11-28
00:42:11 UTC (rev 5317)
+++
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/regexp/RENode.java 2010-11-28
00:45:19 UTC (rev 5318)
@@ -89,28 +89,28 @@
{
/** . */
- private final Ref<Exp> exp;
+ private final Ref<Expr> exp;
/** . */
private final Ref<Alternative> next;
- public Alternative(Exp exp)
+ public Alternative(Expr exp)
{
this(exp, null);
}
- public Alternative(Exp exp, Alternative next)
+ public Alternative(Expr exp, Alternative next)
{
- this.exp = new NonNullableRef<Exp>(exp);
+ this.exp = new NonNullableRef<Expr>(exp);
this.next = new NullableRef<Alternative>(next);
}
- public Exp getExp()
+ public Expr getExp()
{
return exp.get();
}
- public void setExp(Exp exp)
+ public void setExp(Expr exp)
{
this.exp.set(exp);
}
@@ -139,13 +139,13 @@
}
}
- public static abstract class Exp extends RENode
+ public static abstract class Expr extends RENode
{
/** . */
private Quantifier quantifier;
- private Exp()
+ private Expr()
{
}
@@ -180,7 +180,7 @@
protected abstract void writeTo(StringBuilder sb);
}
- public static abstract class Assertion extends Exp
+ public static abstract class Assertion extends Expr
{
private Assertion()
@@ -206,7 +206,7 @@
}
}
- public static abstract class Atom extends Exp
+ public static abstract class Atom extends Expr
{
private Atom()
{
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/regexp/RegExpParser.java
===================================================================
---
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/regexp/RegExpParser.java 2010-11-28
00:42:11 UTC (rev 5317)
+++
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/regexp/RegExpParser.java 2010-11-28
00:45:19 UTC (rev 5318)
@@ -103,7 +103,7 @@
{
if (index < to)
{
- RENode.Exp exp = parseExpression();
+ RENode.Expr exp = parseExpression();
if (index < to)
{
RENode.Alternative next = parseAlternative();
@@ -132,22 +132,22 @@
* @return the expression
* @throws SyntaxException any syntax exception
*/
- public RENode.Exp parseExpression() throws SyntaxException
+ public RENode.Expr parseExpression() throws SyntaxException
{
if (index == to)
{
throw new SyntaxException();
}
- RENode.Exp exp;
+ RENode.Expr exp;
char c = s.charAt(index);
switch (c)
{
case '^':
- exp = new RENode.Exp.Assertion.Begin();
+ exp = new RENode.Expr.Assertion.Begin();
index++;
break;
case '$':
- exp = new RENode.Exp.Assertion.End();
+ exp = new RENode.Expr.Assertion.End();
index++;
break;
case '(':
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/RegExpAnalyser.java
===================================================================
---
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/RegExpAnalyser.java 2010-11-28
00:42:11 UTC (rev 5317)
+++
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/RegExpAnalyser.java 2010-11-28
00:45:19 UTC (rev 5318)
@@ -102,7 +102,7 @@
}
}
- private void visit(RENode.Exp expression) throws MalformedRegExpException
+ private void visit(RENode.Expr expression) throws MalformedRegExpException
{
Quantifier quantifier = null;
if (expression instanceof RENode.Dot)
Modified:
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/regexp/TestParser.java
===================================================================
---
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/regexp/TestParser.java 2010-11-28
00:42:11 UTC (rev 5317)
+++
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/regexp/TestParser.java 2010-11-28
00:45:19 UTC (rev 5318)
@@ -19,8 +19,6 @@
package org.exoplatform.web.controller.regexp;
-import junit.framework.AssertionFailedError;
-import junit.framework.TestCase;
import org.exoplatform.component.test.BaseGateInTest;
import java.util.regex.Pattern;
@@ -99,7 +97,7 @@
{
try
{
- RENode.Exp exp = parser.parseExpression();
+ RENode.Expr exp = parser.parseExpression();
assertEquals(expectedValue, exp.toString());
assertEquals(expectedIndex, parser.getIndex());
return this;
Show replies by date