The problem is that sometimes you want the VECTOR_EXPR as such. And
when you want which is not evident from the context of executing these
'expression' rules. Perhaps this is a use-case for scopes?
And we haven't even gotten to the difficult cases of handling these
tuples (think something like
sortKey : expression;
expression
: QUOTED_IDENTIFIER -> ^( COLUMN ALIAS_REF[Template.TEMPLATE]
QUOTED_IDENTIFIER[$QUOTED_IDENTIFIER] )
// we treat the so-called standard functions differently because
they are handled differently by the HQL lexer which we also use here...
| standardFu
On May 1, 2009, at 5:03 PM, Steve Ebersole wrote:
> Lets say sortKey comes back as
> ^( VECTOR_EXPR
>^( COLUMN
>ALIAS_REF["a"] IDENTIFIER["col1"]
>)
>^( COLUMN
>ALIAS_REF["a"] IDENTIFIER["col2"]
>)
> )
>
> I'd really like sortSpecification to go from:
>
> ^( SORT_
Lets say sortKey comes back as
^( VECTOR_EXPR
^( COLUMN
ALIAS_REF["a"] IDENTIFIER["col1"]
)
^( COLUMN
ALIAS_REF["a"] IDENTIFIER["col2"]
)
)
I'd really like sortSpecification to go from:
^( SORT_SPEC ^( VECTOR_EXPR["see above"] ) )
to:
^( SORT_SPEC ^( COLUMN
many thanks for all that Jim !
Michael
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--~--~-~--~~~---~--~~
You received this message because you are subscribed to th
Hi,
We have a new Maven artifact available: maven-gunit-plugin, this
automates the running of gunit tests as part of a Maven build.
Documentation to follow, but it is fairly easy to work out if you
already know ANTLR and gUnit. It can be used as:
org.antlr
maven-gunit-plugin
Steve Ebersole wrote:
> Is there a syntax to "explode" a subrule result (sorry don't know a
> better term).
>
> I have a rule:
>
> sortSpecification
> : sortKey collationSpecification? orderingSpecification?
> -> ^( SORT_SPEC sortKey collationSpecification?
> orderingSpecification? )
>
Hi Steve, what's the tree you need rather than the output?
Thanks,
T
On May 1, 2009, at 1:14 PM, Steve Ebersole wrote:
> Is there a syntax to "explode" a subrule result (sorry don't know a
> better term).
>
> I have a rule:
>
> sortSpecification
>: sortKey collationSpecification? orderingSpec
Is there a syntax to "explode" a subrule result (sorry don't know a
better term).
I have a rule:
sortSpecification
: sortKey collationSpecification? orderingSpecification?
-> ^( SORT_SPEC sortKey collationSpecification?
orderingSpecification? )
;
The result of the sortKey subrul
At 06:32 2/05/2009, Bill Steer wrote:
>INT : (DIGIT)+ ;
>FLOAT : INT
> | INT '.' INT
> | '.' INT
>;
>CONSTANT: FLOAT
> | FLOAT ('e' | 'E') ('+' | '-')? INT
>;
[...]
>IDENT : LETTER (LETTER | DIGIT)* ;
>REGISTER: I
> Hi Bill,
>
> In the 'expr' rule, you have the following action that is missing a
> semicolon:
> {$value = $e.value}
>
> In the 'atom' rule, you have an action with a call to toInt32 instead of
> ToInt32.
>
> You should add a cast to ArrayList in your action in the 'elist' rule.
>
> I can't r
Hi Bill,
In the 'expr' rule, you have the following action that is missing a
semicolon:
{$value = $e.value}
In the 'atom' rule, you have an action with a call to toInt32 instead of
ToInt32.
You should add a cast to ArrayList in your action in the 'elist' rule.
I can't reproduce the 'eee' error
I've now found four errors in the generation of the C# code for my grammar:
1. A statement is missing a semicolon
2. A statement is missing a cast from IList to ArrayList
3. A statement contains "Convert.toInt32" instead of "Convert.ToInt32"
4. An exception variable is "eee1" but it is referenced
Hugo Leeney wrote:
> I'm thinking I need to stick with http://www.antlr.org/download.html
> for my purposes. If I understand correctly there are files missing
> from the source distro there at the moment so a full build of that is
> not currently possible but should be soon. I can go into the sepa
The attached grammar seems to parse fine when given empty input and
calling into the parsing method but with gunit I it gives me
NullPointerException.
betelge...@pena ~/python/depend $ gunit Depend.testsuite
---
executing testsuit
At 09:51 1/05/2009, Gabriel Petrovay wrote:
>ANTLR could either ignore ambiguous rules (if the computed k is
>t large, give up) and proceed with normal computation.
>Another thing ANTLR could do is be to compute k per-rule and
>not per grammar.
k is already computed per-rule, or possibly
I'm thinking I need to stick with http://www.antlr.org/download.html
for my purposes. If I understand correctly there are files missing
from the source distro there at the moment so a full build of that is
not currently possible but should be soon. I can go into the separate
directories (tool/ run
17 matches
Mail list logo