Hey Ter,
New name sounds good to me to distinguish. Yes it will break things,
but well if you go to v4 that can be expected anyway - as it's a major
release. =)
Martijn
On Sat, Sep 24, 2011 at 6:36 PM, Terence Parr pa...@cs.usfca.edu wrote:
Hi. I'm working on the v4 runtime and, since I have
Hello,
You could override toString() and do it yourself (rendering it and its
children the way you like) or add an additional method to CommonTree
to do what you want.
Martijn
On Wed, Apr 6, 2011 at 9:39 AM, Wilson Urdaneta aki...@gmail.com wrote:
On Wed, Apr 6, 2011 at 3:
Hi everyone,
This
Hello,
I personally prefer a manual tree-visitor (which walks the AST), that
way you can just evaluate a node and based on the result take
appropriate action, it also allows more control (e.g. multi-phases if
needed). The main reason I do it that way is I don't want any of my
grammars getting
Hello Bill,
The grammar below does the trick for your command (I stripped it
somewhat, to quickly get it working). See the SHELL_COMMAND token,
notice the options part with the greedy identifier. It reads until it
encounters the newline stuff. You need to have something in front of
it, like SHELL
, Bill Lear r...@zopyra.com wrote:
On Friday, November 26, 2010 at 19:23:24 (+0100) Martijn Reuvers writes:
Hello Bill,
The grammar below does the trick for your command (I stripped it
somewhat, to quickly get it working). See the SHELL_COMMAND token,
notice the options part with the greedy
Hello Simon,
You might want to check out the documentation on
BufferedTreeNodeStream, you could use methods like seek(..), index()
etc. A long time ago on the Java side there was a bug in it, I do not
know what the current state is (let alone the C target).
Another way is to walk the AST
Hello Maurizio,
By not seeing the whole grammar it's a bit difficult to guess, but
adding WS at your #define statement will cause trouble (assuming you
either write the WS to the hidden channel or skip() it). If not you'd
have other issues I expect. You don't need the space there for what I
can
Hey Bill,
It seems so, but its not hard. Roughly you should create the adaptor
below this email, where you implement your own ASTNodes. And then set
it on the parser you are using, e.g:
SimpleParser parser = new SimpleParser(new
CommonTokenStream(createLexer(value)));
.
There is quite a bit of work involved but it is very orthogonal and so not
difficult when you see the pattern.
Jim
-Original Message-
From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
boun...@antlr.org] On Behalf Of Martijn Reuvers
Sent: Friday, July 09, 2010 2:20
Hello everyone,
I have a question related to determining the type returned from an
expression on 'compile' time (not runtime!).
For example take the following code:
***
function someFunction(int a) return string {
return a string!
}
int finalValue = (100+5)*2 +
10 matches
Mail list logo