
|
If you were logged in you would be able to see more operations.
|
|
|
ANTLR v3
Created: 03/Jan/07 11:38 AM
Updated: 03/May/07 06:49 PM
|
|
| Component/s: |
ANTLR Core
|
| Affects Version/s: |
3.0b5
|
| Fix Version/s: |
3.0b8
|
|
|
I wrote the following pattern
^(e=entity{value=$e} X?)
Antlr produced the following logic
e=entity();
if( input.LA(1) == Token.DOWN){
match(input Token.DOWN, null);
value = e;.
......
match(input Token.UP, null);
}
In other words, Antlr was perfectly willing to deal with the possibility that no X means no tree. But the action was only done if there was a tree.
|
|
Description
|
I wrote the following pattern
^(e=entity{value=$e} X?)
Antlr produced the following logic
e=entity();
if( input.LA(1) == Token.DOWN){
match(input Token.DOWN, null);
value = e;.
......
match(input Token.UP, null);
}
In other words, Antlr was perfectly willing to deal with the possibility that no X means no tree. But the action was only done if there was a tree.
|
Show » |
|