commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dion Gillard" <dion.gill...@gmail.com>
Subject Re: International characters in JEXL
Date Tue, 26 Sep 2006 08:52:30 GMT
Randy (and anyone else listening),

javacc 4 generates jdk1.4 compatible source code by default. If you
need 1.3 or 1.2 compatible input use JDK_VERSION:1.2

The generated code still seems to have a few 1.4 specific pieces in
it, such as use of  RuntimeException(Throwable).

If you want to compile Jexl against 1.2/1.3 using maven, you'll need
the following command line invocation (all on one line):

maven -Dmaven.compile.fork=yes
-Dmaven.compile.executable=c:\jdk1.3.1_16\bin\javac.exe
-Dbuild.compiler=modern
clean test

Obviously the javac executable will probably be different on your machine.

On 9/21/06, Randy H. <ruweih@gmail.com> wrote:
>
> I had similar issue with the latest jexl 1.1 release. Seems the option for
> unicode support is not enabled when using the parser was generated.
>
> Here is what I did to get it work with non-ASCII code:
>
> 1. Download and unzip jexl 1.1 source from:
> http://www.axint.net/apache/jakarta/commons/jexl/source/commons-jexl-1.1-src.zip
>
> 2. Download and unzip JavaCC 4.0 from:
> https://javacc.dev.java.net/files/documents/17/26777/javacc-4.0.zip
>
> 3. Run javacc-4.0\bin\javacc -UNICODE_INPUT
> commons-jexl-1.1-src\src\java\org\apache\commons\jexl\parser\Parser.jj
>
> 4. Copy *.java to
> commons-jexl-1.1-src\src\java\org\apache\commons\jexl\parser
>
> 5. Run ant -f commons-jexl-1.1-src\build.xml
>
> 6. Use the new jar commons-jexl-1.1-src\target\commons-jexl-1.1.jar
>
> 7. Profilt! :)
>
> Randy
>
>
> Dion Gillard-2 wrote:
> >
> > Not sure how/if the grammar supports it. I'll have a look.
> >
> > On 8/18/06, Adam Orendorz <aorendorz@efbud.com.pl> wrote:
> >>
> >> How can I use international characters in JEXL expressions?
> >>
> >> For example: myvar == 'U┼╝ytkownik'  (string constant contains Polish 'z'
> >> with dot)
> >>
> >> I get the following exception:
> >>
> >> org.apache.commons.jexl.parser.TokenMgrError: Lexical error at line 1,
> >> column 17.  Encountered: "\u0139" (313), after : "\'U"
> >> --
> >> View this message in context:
> >> http://www.nabble.com/International-characters-in-JEXL-tf2124332.html#a5860795
> >> Sent from the Commons - User forum at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >>
> >>
> >
> >
> > --
> > http://www.multitask.com.au/people/dion/
> > "If you even dream of beating me you'd better wake up and apologize" -
> > Muhammad Ali
> >
> >
>
> --
> View this message in context: http://www.nabble.com/International-characters-in-JEXL-tf2124332.html#a6417889
> Sent from the Commons - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


-- 
http://www.multitask.com.au/people/dion/
Rule of Acquisition #91: Hear all, trust nothing.
Mime
View raw message