build. If I uncomment
them all, it gives me one of the above warnings for each letter of the
alphabet that a keyword starts with, pretty much.
Anyone have any idea what's going on?
Sam Barnett-Cormack
--~--~-~--~~~---~--~~
You received this message because you a
ve started adding parser rules, and all is well.
Sam
Sam Barnett-Cormack wrote:
> Hi all,
>
> I'm back to using ANTLR after a long time away, and in principle I have
> to say I'm liking ANTLR3. However, I'm seeing something very strange.
>
> Based on advice in v
Rick Schumeyer wrote:
> This works, but it gives me one token containing "12:34:56". I still
> need to parse the hh,mm,ss values. What is the best way to do that?
>
> It seems that I want the parser to be able to tell the lexer "normally
> you can consider INT:INT:INT as a STRING. But right
e parser, as there's
no need whatsoever to hold onto that. However, it's a *requirement* to
discard newlines, along with any other whitespace immediately preceding
or succeeding each. It'd be really frustrating to have to change that at
a later stage in processing.
So, can anyo
; that's found inside a string
literal into a single '"' before passing it on to the parser, as there's
no need whatsoever to hold onto that. However, it's a *requirement* to
discard newlines, along with any other whitespace immediately preceding
or succeeding each.
Gavin Lambert wrote:
> At 04:48 27/02/2009, Sam Barnett-Cormack wrote:
> >http://www.antlr.org/blog/antlr3/lexical.tml suggests that it's
> >no longer possible to alter the content of a token away from
> >what's on the input at all.
>
> That isn&
Hey all,
So, my ASN.1 grammar is progressing, but I've run into a problem that I
*think* is due to left-recursion complexities. I've attached the whole
grammar (bits that are commented out are generally references to rules
from other bits of the standards that I haven't reached yet - want to
s
Hi all
So, I solved the recursion issue (which had been complicated by me
failing to notice a '|' in the standard), and fixed a lot of intractable
issues using predicates (or backtracking, at least for now). However,
I'm still getting some errors/warnings which I can't for the life of me
figu
Johannes Luber wrote:
> Sam Barnett-Cormack schrieb:
>>
>> If anyone can offer me some guidance, I'd really appreciate it.
>
> Did you see
> <http://www.antlr.org/wiki/display/ANTLR3/Left-Recursion+Removal> already?
Looked at it, didn't find anyt
Sam Barnett-Cormack wrote:
> Hi all
>
> So, I solved the recursion issue (which had been complicated by me
> failing to notice a '|' in the standard), and fixed a lot of intractable
> issues using predicates (or backtracking, at least for now). However,
> I
Hi all
[resent with grammar *actually* attached]
So, I solved the recursion issue (which had been complicated by me
failing to notice a '|' in the standard), and fixed a lot of intractable
issues using predicates (or backtracking, at least for now). However,
I'm still getting some errors/warning
Gavin Lambert wrote:
> At 03:10 2/03/2009, Sam Barnett-Cormack wrote:
> >[resent with grammar *actually* attached]
>
> Apparently not.
I'm clearly being a moron this weekend. Third time lucky?
Sam, feeling like a moron.
--~--~-~--~~~---~--~---
Gavin Lambert wrote:
> At 11:21 2/03/2009, Sam Barnett-Cormack wrote:
> >NUMBER : ;
>
> Defining non-fragment rules that can succesfully match nothing (ie.
> empty string) is Bad(tm).
>
> >BSTRING : '\'' BSTRINGCONT '\'B';
> [...]
&
Hey all,
With Gavin's generous help, I'm down to one error and a couple of
warnings, which is nice.
In the attached grammar, I haven't fixed the lexer issues Gavin
identified yet, as I'm focused on the parser for the moment.
The error is on line 473, as are two of the warnings. I can't say as
Sam Barnett-Cormack wrote:
> Hey all,
>
> With Gavin's generous help, I'm down to one error and a couple of
> warnings, which is nice.
>
> In the attached grammar, I haven't fixed the lexer issues Gavin
> identified yet, as I'm focused on the parser
Sam Barnett-Cormack wrote:
> Sam Barnett-Cormack wrote:
>> Hey all,
>>
>> With Gavin's generous help, I'm down to one error and a couple of
>> warnings, which is nice.
>>
>> In the attached grammar, I haven't fixed the lexer issues Gavin
&
Jim Idle wrote:
> Sam Barnett-Cormack wrote:
>> Sam Barnett-Cormack wrote:
>>
>>> Sam Barnett-Cormack wrote:
>>>
>>>
>>> type : ((typeWithConstraint)=>typeWithConstraint | builtinType |
>>> referencedType) constraint* ;
Hi all,
I've wracked my brains on this one, and really can't see what's going on.
I've got one error in my grammar, and I just can't see how it's come
about. I've been listening to everything people have said, I've been
trying to apply what I've learned, most notably drilling into rules and
ex
Jim Idle wrote:
> Sam Barnett-Cormack wrote:
> I was trying to look at your grammar for you but the one you have
> attached is missing some token defs:
>
> ...
> [08:08:06] warning(105): ASN_1.g:456:7: no lexer rule corresponding to
> token: BSTRING
> [08:08:06] warn
Thomas Brandon wrote:
> On Thu, Mar 5, 2009 at 9:50 PM, Andreas Meyer
> wrote:
>> Maybe it's possible to partition the set of keywords, but that would be
>> some effort: figuring out for 800 keywords, where they appear, what is
>> the context they are used in etc. Note that the problem only appea
Edgar Espina wrote:
> Hi,
>
> ANTLR IDE 1.3.0 is now available at http://antlrv3ide.sourceforge.net/.
Hi - trying to update my ANTLR IDE installation, I get an error. Part of
it seems to have been updated (JDT integration), and as far as I can
tell all other components are up to date. Version
Hi all
The attached grammar (which you're probably all tired of) generates Java
code with an error in. I've checked, and the error isn't in a copy
action or predicate - it's in the expansion of $text in a parser
predicate. I don't know if I've used $text incorrectly, because I'm
using it as I
Jim Idle wrote:
> Sam Barnett-Cormack wrote:
>> Hi all
>>
>> The attached grammar (which you're probably all tired of) generates
>> Java code with an error in. I've checked, and the error isn't in a
>> copy action or predicate - it's in the
Jim Idle wrote:
> Sam Barnett-Cormack wrote:
>> Jim Idle wrote:
>>> Sam Barnett-Cormack wrote:
>>>> Hi all
>>>>
>>>> The attached grammar (which you're probably all tired of) generates
>>>> Java code with an error in. I
Sam Barnett-Cormack wrote:
> Jim Idle wrote:
>> Sam Barnett-Cormack wrote:
>>> Jim Idle wrote:
>>>> Sam Barnett-Cormack wrote:
>>>>> Hi all
>>>>>
>>>>> The attached grammar (which you're probably all tired of) gen
Andreas Meyer wrote:
> Sam Barnett-Cormack schrieb:
>> Hi all
>>
>> The attached grammar (which you're probably all tired of) generates
>> Java code with an error in. I've checked, and the error isn't in a
>> copy action or predicate - it's i
String or something?
Bearing in mind that I can't test at the moment because the computer
that that work is one decided to be difficult...
Sam
> On Mar 6, 2009, at 11:55 AM, Johannes Luber wrote:
>
>> Sam Barnett-Cormack schrieb:
>>> Andreas Meyer wrote:
>>>> Sam
Terence Parr wrote:
>
> On Mar 6, 2009, at 2:02 PM, Sam Barnett-Cormack wrote:
>
>> Terence Parr wrote:
>>> Hi Guys,quikly scanning...$text means text for entire rule; if
>>> hoisted out of rule it makes no sense. sem predicates should only use
>>> fu
he WS on the hidden
channel. Tokens are usually complete lexical elements - not single
characters. Otherwise, the parser may as well be working on the input
stream rather than a token stream.
--
Sam Barnett-Cormack
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http:/
Maciej Gawinecki wrote:
> Hello,
>
> Thanks for your response.
>
> Sam Barnett-Cormack wrote:
>
> [cut]
>
>> It's far more common to make VALUE, ID, and COMMENT token types (and
>> comment different to what you have now - from // to newline inclus
Stevenson, Todd (GE Healthcare, consultant) wrote:
> This grammar will not compile. I can't figure out why not. It
> generates the error:
>
> reference to undefined rule: keypath
>
> even though it exists. Help!
>
> Thanks.
>
> --
Hey all,
Following Edgar's advice, I got this updated and all seems well.
However, it appears that while it "supports" ANTLR 3.1.2, it still uses
the ANTLR 3.1.1 code generation tool? Is this right?
Sam
Edgar Espina wrote:
> Hi,
>
> ANTLR IDE 1.3.0 is now available at http://antlrv3ide.source
Hi all,
I seem to recall posting about this back in the ANTLR 2 days, but now I
found myself running into it again.
I'd like there to be some vague documentation generated by Javadoc for
my parser/lexer/etc. I've got a combined grammar, with a doc-comment on
the grammar itself. This gets attache
Jim Idle wrote:
> Sam Barnett-Cormack wrote:
>> Hi all,
>>
>> I seem to recall posting about this back in the ANTLR 2 days, but now I
>> found myself running into it again.
>>
>> I'd like there to be some vague documentation generated by Javadoc for
Gerald Rosenberg wrote:
>
> There is a related problem concerning annotations. Like class comments,
> they need to be positioned below all imports. Perhaps Antlr should not
> insert any import statements of its own if the grammar contains a header
> block. Don't know how difficult it would be
Hi all,
Having used google to search the archives, and the whole web, and found
only references to some apparently out-of-date stuff to do with
"ASTFrame", I'm now asking - does anyone know an easy way to visualise a
generated AST?
Sam
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Jim Idle wrote:
> Sam Barnett-Cormack wrote:
>> Hi all,
>>
>> Having used google to search the archives, and the whole web, and found
>> only references to some apparently out-of-date stuff to do with
>> "ASTFrame", I'm now asking - does anyone
Hi all,
I've been trying to actually remove ambiguities, rather than papering
over the cracks with backtrack (as I realised there are some fundamental
ways in which this isn't going to work). I realised that there are a lot
of cases of value expressions being redundant between types. The
standard
Stevenson, Todd (GE Healthcare, consultant) wrote:
> I am looking for a utility to convert an Antlr grammar to a nice BNF
> document that I can use in my documentation. Does one exist? I poked
> around on the antlr site and the internet and couldn't see anything. I
> don't want to have to build
might be
able to use libraries to help with the Java handling, but direct
object--object translation seems unlikely.
--
Sam Barnett-Cormack
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--~--~---
ass could do it - override the emit stuff
and add functions to access already-generated tokens.
--
Sam Barnett-Cormack
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--~--~-~--~~---
Hi all,
Working based on the example on page 86 of TDAR, I have the following rule:
objIdComponents returns [boolean hasNandN]
@init {
$hasNandN = false;
}
: (c=objIdComponent {if $c.nAndN $hasNandN=true;})+ ;
And the generated code includes:
ASN_1Parser.objIdComponents_return retval = new
So, I'm trying to deal with some of the parse ambiguities in my grammar
lazily - accept lots of stuff in the parser, and do some tree rewriting
to fix things (and find some errors).
What I want to do is look at all VLIST trees, determine which of the
following cases they fit:
1) All children are
Terence Parr wrote:
> http://www.antlr.org/jira/browse/ANTLR-392
>
> any objections?
Would this effectively make
rule : .* (some-exit-set)
into
rule : ~(some-exit-set)* (some-exit-set)
Except, presumably, for magic with predicates and LL(*) cunningness?
--
Sam Barnett-Cormack
L
Terence Parr wrote:
>
> On Mar 21, 2009, at 12:12 PM, Sam Barnett-Cormack wrote:
>
>> Terence Parr wrote:
>>> http://www.antlr.org/jira/browse/ANTLR-392
>>> any objections?
>>
>> Would this effectively make
>>
>> rule : .* (some-exit-set)
Gavin Lambert wrote:
> You should always list your more-specific alternatives above the
> less-specific ones (so have your nameAndNumberForm above the ~NAMENUM alt).
>
> Also, label+=(block ...) doesn't actually work -- the label always ends
> up being null.
That's annoying, but easy to bare in
Gavin Lambert wrote:
> valueListValue
> scope { bool hasOther; bool hasNameNum; }
> @init { $valueListValue::hasOther = false; $valueListValue::hasNameNum =
> false; }
> : ^(VLIST
> ( v+=nameAndNumberForm { $valueListValue::hasNameNum = true; }
> | (v+=externalValueReference | v+=LCID |
As this compiles fine from the command-line tool, I'm going to assume
this is an ANTLR IDE problem... Edgar, any illumination on this?
Sam
Sam Barnett-Cormack wrote:
> On a separate note, trying to compile the tree grammar with these
> adjustments doesn't give me any antlr err
Hi all,
Trying to build my grammar, I get the following (including my command line):
s...@canth:~$ java -cp javalib/antlr-3.1.2/lib/antlr-3.1.2.jar
org.antlr.Tool -o tmp/junk workspace/asn.1-parse/grammars/ASN_1.g
error(10): internal error: workspace/asn.1-parse/grammars/ASN_1.g :
java.lang.Ille
Terence Parr wrote:
>
> On Mar 22, 2009, at 7:49 AM, Sam Barnett-Cormack wrote:
>
>> Hi all,
>>
>> Trying to build my grammar, I get the following (including my command
>> line):
>>
>> s...@canth:~$ java -cp javalib/antlr-3.1.2/lib/antlr-3.1.2.jar
Jim Idle wrote:
> Sam Barnett-Cormack wrote:
>> Terence Parr wrote:
>>>
>>> term+=(~(RSQR|LSQR)))*
>>>
>>> is your problem. known bug :) can't add sets to a list yet.
>>>
>>
>> The full rule is:
>>
>&
Hey all,
Say I wanted to tweak the Java target - say, create a new DoccedJava
target that's identical apart from doing some generated doc-comments in
the output. I know that it'd break with new versions and so on, but I'm
happy to maintain it privately for my own use. I'm not saying add it to
the
Sam Barnett-Cormack wrote:
> Hey all,
>
> Say I wanted to tweak the Java target - say, create a new DoccedJava
> target that's identical apart from doing some generated doc-comments in
> the output. I know that it'd break with new versions and so on, but I'm
> h
Hi all,
So, we use doc-comments (/** */) in our grammars. However, as far as I
can tell, there's no way to auto-process these and generate nice docs.
Does anyone know of one?
*If* the answer is no, I'm interested in using some of my spare time to
create one. I've already looked into adapting the
Jim Idle wrote:
> Sam Barnett-Cormack wrote:
>> Hi all,
>>
>> So, we use doc-comments (/** */) in our grammars. However, as far as I
>> can tell, there's no way to auto-process these and generate nice docs.
>> Does anyone know of one?
>>
>> *If*
Sam Barnett-Cormack wrote:
> Jim Idle wrote:
>> Sam Barnett-Cormack wrote:
>>> Hi all,
>>>
>>> So, we use doc-comments (/** */) in our grammars. However, as far as I
>>> can tell, there's no way to auto-process these and generate nice docs.
>&
to people you
present the docs to. However, no way around that if you want to reuse
the API. It's all rather a toss-up in many ways.
Sam
> Sam Barnett-Cormack wrote:
>> Sam Barnett-Cormack wrote:
>>> Jim Idle wrote:
>>>> Sam Barnett-Cormack wrote:
>>>>
up a quick outline-design, and
anyone who wants to help can help me nail it down to something specific,
and possibly help actually write it ;) areas that'd speed me up most
would be writing output engines and bringing extra (more experienced?)
minds to the parsing. Design usually produce
Hi all,
We all (generally) use the default and hidden channels. What if I wanted
there to be another channel which, usually, doesn't get used, but if I
want to tune to it as well I won't get the actual whitespace? Say for
tokens that you mostly won't be interested in, but may want to
programmatic
Dennis Brothers wrote:
> On Mar 23, 2009, at 2:23 PM, Sam Barnett-Cormack wrote:
>
>> Sam Harwell wrote:
>>> Why not create our own format that properly describes grammars?
>>>
>>> We could group them by the Tokens file they reference to cover
&g
Dennis Brothers wrote:
> On Mar 23, 2009, at 4:31 PM, Sam Barnett-Cormack wrote:
>
>> Dennis Brothers wrote:
>>> Since ANTLR uses ANTLR to parse itself, couldn't the ANTLR grammar
>>> be modified or extended to recognize and emit doc comments and
>>&
Dennis Brothers wrote:
> On Mar 23, 2009, at 2:23 PM, Sam Barnett-Cormack wrote:
>
>> Sam Harwell wrote:
>>> Why not create our own format that properly describes grammars?
>>>
>>> We could group them by the Tokens file they reference to cover
&g
Lucien Antlr wrote:
> Hi folks,
>
> Still wrestling with the ins and outs of the tool, I came up with
> something I expected to work but that didn't.
>
> I expected lab=(EQ expr) to assign the AST to "lab", but rather it
> always returns a null.
>
> The equivalent working statement would be
Anders Hessellund wrote:
> Hi,
>
> I've been googling and reading FAQs for some information about how Antlr
> and Java Generics relate but nothing significant has shown up.
>
> - Does anyone here know of a good tutorial or perhaps just an example
> grammar?
>
> - One of the thing that I would l
Gabriele Palma wrote:
> I'm modifying my working grammar. I created a new rule which does
> something previously done by another rule. I renamed the old rule and
> it is now unreferenced in the whole grammar, while old reference now
> go to the new rule. Everything seems fine, the grammar recogniz
h these. LT will still show them, I guess. Wouldn't it be
better to have the tree parser control the application of the rule by
only applying it "under" the node above? Or if this *is* at the top
level, your solution might well work, as you've demonstrated that you
only get
'&'": T__82, T__87, T__90
> [java]
> [java] As a result, token(s) T__87,T__90 were disabled for that input
> [java] warning(209): src/grammars/JavaScript.g:1307:1: Multiple token
> rules can match input such as "'w'": T__62, T__69, Identifier
25 Jim Idle mailto:j...@temporal-wave.com>>
>
> Sam Barnett-Cormack wrote:
>> Filipe David Manana wrote:
>>
>>> Hello,
>>>
>>> I am facing here something weird.
>>>
>>> I have a grammar which compiles fin
- working out an API for receiving and
outputing language information.
If there's interest in this, I can either keep the list updated, or just
those who are interested. If I get it off the ground and ANTLR folks
don't want it in the ANTLR stable, I'll sort out other hosting and
maili
becomes possible to produce unified documentation that, with one "group"
of webpages documenting you grammars, your templates, and your classes.
Doesn't sound too general to be useful to me.
Sam
> Sam Barnett-Cormack wrote:
>> Okay, this weekend I plan to start work on a sui
you can figure out a set of reasonable documentation
> practices for grammars, please post them to the list for discussion.
> We might learn something.
I'll be doing my initial design work (over and above the vague structure
in my head) this weekend - I'll certainly post it to th
Daniels, Troy (US SSA) wrote:
> The standard solution here to define fairly generic tokens in the lexer, then
> have parser rules that distinguish between them.
>
> mapping : attribute '=' attribute;
> key: ALPHA ;
> attribute: ALPHA | ALPHANUM;
> ALPHA : ('A'..'Z' | 'a'..'z')+;
> ALPHANUM : ('A
y ambiguity warnings on any other Java implementation.
I've had similar issues with ANTLR sporadically claiming that my lexer
rules are ambiguous (they aren't unless k=1), and I would hope that my
development machine isn't considered underpowered (1.6GHz Atom, 1GB RAM,
running
e a feeling it might be easier to break it more literally into an
equivalent of the MetaWare's presumed AST evaluation:
Even := 0;
Odd := Event;
By some tree flattening of some sort. I'd think about it more, but I
have to go and have my spine x-rayed.
--
Sam Barnett-Cormack
List:
to-left; the
value of an assignment expression is the value that was assigned. The
AST would be like
(ASS Odd (ASS EVEN 0))
I'm sure in your case the dialect your translating to doesn't like it,
or you wouldn't be worried, but I thought it was worth mentioning as
background.
standard hook interface so
that rules that *can* lead to keywords look them up. It's a fairly
standard coding pattern, AFAICT, so providing an ANTLRish way to do it
would make sense. I think it's more efficient than a rule-per-keyword
(or the equivalent, using
Gavin Lambert wrote:
> At 00:02 2/04/2009, Sam Barnett-Cormack wrote:
> >However, k=*, it'll do whatever lookahead is needed, so there
> >isn't actually an ambiguity with LL(*). It would be silly to
> >left-factor, say:
> >
> >EVERY :
Ramakrishnan Venkataramani wrote:
> Hello,
> I am new to ANTLR. I am looking for a very simple SQL statement like
> SELECT and INSERT written in ANTLR grammar. I am also looking for the
> corresponding lexer, parser, and the test file (which reads the lexer,
> parser files and produces output).
Foust wrote:
> Wow, Andy. So well-said.
>
> Both about the difficulty of parsing C/C++ and the state of tree walkers.
> It's so easy to shoot yourself in the foot using Antlr. It can simplify the
> initial design when you're still figuring out what you want to do, but as
> the codebase grows, yo
7;-')=>('-' Integer)|) ;
This should prevent range from exiting prematurely. However, if you're
designing this language, I'd recommend getting rid of the inherent
ambiguity by putting in an expression terminator or requiring
start-and-end markers for range (pa
;
> }
>
> This is allowed in the C99 standard, section 6.8.2, and
> by the GCC manual section 5.26 "Mixed Declarations and Code".
And explicitly not allowed by earlier "standard" (eg ISO, K&R) C
standards... do we document what standard StdCPardser is meant to t
Hi all,
In my ongoing project, I need to parse a really crazy structure that
wants to change the lexing rules dependent on syntactic factors. I hate
this.
Within the thing I'm talking about, whitespace and comments are handled
as they are the rest of the time (thankfully). Alphanumeric tokens
Sam Barnett-Cormack wrote:
> Hi all,
>
> In my ongoing project, I need to parse a really crazy structure that
> wants to change the lexing rules dependent on syntactic factors. I hate
> this.
>
>
> 1) Use member variables to track if the most recent non-WS, non-c
al Message-
> From: antlr-interest-boun...@antlr.org
> [mailto:antlr-interest-boun...@antlr.org] On Behalf Of Sam
> Barnett-Cormack
> Sent: Saturday, April 11, 2009 1:45 PM
> To: ANTLR Interest Mailing List
> Subject: [antlr-interest] Stupid languages, and parsing them
>
>
Thomas Brandon wrote:
> On Sun, Apr 12, 2009 at 4:45 AM, Sam Barnett-Cormack
> wrote:
>> Hi all,
>>
>> In my ongoing project, I need to parse a really crazy structure that
>> wants to change the lexing rules dependent on syntactic factors. I hate
>> this.
>
Thomas Brandon wrote:
> On Sun, Apr 12, 2009 at 6:01 AM, Sam Barnett-Cormack
> wrote:
>> I'm not sure an island grammar would work, as I need the eventual AST of the
>> "WITH SYNTAX" block to be included in the final AST of the master grammar.
>>
>&g
Hi all,
So, in my grammar I have need to re-use rules so they ultimately refer
to a different rule (so I don't have to duplicate
intersection/union/exception rules). I use a parameter and gated
predicates, like so:
elements[boolean os]
: {!$os}?=>subtypeElements
| {$os}?=>objectSetEleme
true and passing it...
Sam
> -Original Message- From: antlr-interest-boun...@antlr.org
> [mailto:antlr-interest-boun...@antlr.org] On Behalf Of Sam
> Barnett-Cormack Sent: Monday, April 13, 2009 6:33 AM To: ANTLR
> Interest Mailing List Subject: [antlr-interest] Pr
Sam Barnett-Cormack wrote:
> I guess the question really is, for me, why does it get hoisted in one
> case and not another? I'm assuming it's because of the choice in the
> objectSetSpec rule, and I can't see any way to refactor that to lose the
> choice. Of course
e. I don't think I fully understand nesting of scopes.
Sam (BC)
> -Original Message-
> From: Sam Barnett-Cormack [mailto:s.barnett-corm...@lancaster.ac.uk]
> Sent: Monday, April 13, 2009 7:55 AM
> To: Sam Harwell
> Cc: ANTLR Interest Mailing List
> Subject: Re: [antlr-
Sam Barnett-Cormack wrote:
> Sam Harwell wrote:
>> This will fail unexpectedly with certain types of grammars, as
>> demonstrated by some grammars I've sent to the list in the past. I'll
>> find them later today and send a link.
>
> I can't see why it
Jim Idle wrote:
> Sam Barnett-Cormack wrote:
>> Hi all,
>>
>> So, in my grammar I have need to re-use rules so they ultimately refer
>> to a different rule (so I don't have to duplicate
>> intersection/union/exception rules). I use a parameter and gated
Sam Barnett-Cormack wrote:
> Jim Idle wrote:
>> Sam Barnett-Cormack wrote:
>>> Hi all,
>>>
>>> So, in my grammar I have need to re-use rules so they ultimately refer
>>> to a different rule (so I don't have to duplicate
>>> inter
Jim Idle wrote:
> However, as you can obviously distinguish the cases at some point higher
> up the rule chain, then if you wish to pursue this, then all you need do
> is create a scope with your flag in it at a high enough level, init it
> to the default case, then set/unset it as the rules de
Jim Idle wrote:
> Sam Barnett-Cormack wrote:
>> Jim Idle wrote:
>>> However, as you can obviously distinguish the cases at some point
>>> higher up the rule chain, then if you wish to pursue this, then all
>>> you need do is create a scope with your flag in
ian eyberg wrote:
> On Wed, Apr 15, 2009 at 10:26:58AM -0700, William H. Schultz wrote:
>
> also I do have the current list of usernames allowed for these
> actions before I start trying to figure out what action is what;
> unfortunately since everything gets tokenized BEFORE that logic
> happ
Patrick Schönbach wrote:
> Hi all,
>
> usually, AntLR generates final methods for each rule. However,
> sometimes, one would like to subclass the parser. Is there a way to
> generate non-final methods?
Why do you want the parse methods to be non-final? You can subclass the
lexer/parser as lon
Patrick Schönbach wrote:
> On 16.04.2009 17:29, Sam Barnett-Cormack wrote:
>> Why do you want the parse methods to be non-final? You can subclass
>> the lexer/parser as long as the *class* isn't final. You just can't
>> override the final methods, and it
So, I have this rule:
setting
: (LCURL)=>settingLCURL
| (LCID|externalValueReference)=>referencedValue
| typeornull
| value
| object
;
And I'm getting warnings that multiple choices can match input such as
LCID or LCURL. It's true that a lot of the options can match either, bu
e
>>> somehow?
>> Yep. Depending on the context, you may want to either use a
>> lookahead-based entry predicate to avoid entering the rule if the DIGITs
>> aren't binary-safe, or a exit predicate that raises an error if it turns
>> out that the sequence wasn
1 - 100 of 147 matches
Mail list logo