What is the regular expression that’d match anything , except these strings:
=>, | ?
If you’re familiar with javacc, I’m trying to define my ANYTHING token as shown below:
TOKEN :
{
<ARROW: "=>" >
|
<ANYTHING: (["\u0001" - "\uffdc"])+>
|
<PIPE: "|">
|
<UPPER_CHAR: (["A"-"Z"])>
}
Thanks
Try something like this:
Test.jj
Generate the parser classes:
and run the
mainmethod:will print the following for the input
"foo=>bar=baz|done":