[il-antlr-interest: 25992] Re: [antlr-interest] Referencing/Using antlr3 python runtime directlyinstead of via python setup.py install?

2009-09-29 Thread Dave Dutcher
> -Original Message- > From: Andrew Plumb > Subject: [antlr-interest] Referencing/Using antlr3 python > runtime directlyinstead of via python setup.py install? > > Hi Everyone, > > Does anyone have any examples of how to reference the antlr3 > python runtime code directly from a python

[il-antlr-interest: 25916] Re: [antlr-interest] Question with greedy

2009-09-24 Thread Dave Dutcher
Didn't that used to work in Antlr 2? I think that would be a very useful feature to have back. Dave > -Original Message- > From: antlr-interest-boun...@antlr.org > [mailto:antlr-interest-boun...@antlr.org] On Behalf Of Jim Idle > Sent: Thursday, September 24, 2009 11:39 AM > Cc: ant

[il-antlr-interest: 25304] Re: [antlr-interest] Matching Last Line in ANTLR?

2009-08-18 Thread Dave Dutcher
> -Original Message- > From: consili...@gmail.com > > The last line, b., doesn't match the MC_INCORRECT token > because there's no newline after it. Is there an easy way to > match this in ANTLR? Do you need the newline in the text of the token? You could try removing fragment from t

[il-antlr-interest: 24719] Re: [antlr-interest] Getting the hang of this

2009-07-17 Thread Dave Dutcher
It sounds like you are trying to get somebody to answer your homework questions for you. Have you even tried going to www.antlr.org and reading the tutorials and docs? Dave > -Original Message- > From: antlr-interest-boun...@antlr.org > [mailto:antlr-interest-boun...@antlr.org] On

[il-antlr-interest: 24577] Re: [antlr-interest] Questions

2009-07-09 Thread Dave Dutcher
> -Original Message- > From: Bryan S Follins > > Hello All, > > Can ANTLRWorks be configured to work with Python? > > Can I upgrade from ANTLRWorks 2.77 to 3.0 without having to > reconfigure my computer? I have WinXP 2003 Home Edition. > > As a beginning programmer, how would I use

[il-antlr-interest: 24442] Re: [antlr-interest] Look-ahead problem parsing phrase?

2009-06-30 Thread Dave Dutcher
>From: Sean O'Dell >Subject: Re: [antlr-interest] Look-ahead problem parsing phrase? > >Thanks ... that really did help. I think I didn't realize how much better the parser is than the lexer at >looking-ahead. It makes much more sense to me now, though I'm not yet sure how I will deal with

[il-antlr-interest: 24267] Re: [antlr-interest] AntLR 3 is not validating the LAST character.

2009-06-17 Thread Dave Dutcher
There is a special EOF token you use to mark where the input should end. This would probably work: globalnumber : phonedigit (NEWLINE)* EOF; Dave _ From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-boun...@antlr.org] On Behalf Of Bharath R Sent: Tuesday, June 16,

[il-antlr-interest: 24167] Re: [antlr-interest] Again Cobol:

2009-06-11 Thread Dave Dutcher
ks like it might answer some of your questions. Dave _ From: Mark Taylor [mailto:mtt...@gmail.com] Sent: Thursday, June 11, 2009 9:34 AM To: Dave Dutcher Cc: antlr-inter...@antlr.org Subject: Re: [antlr-interest] Again Cobol: Dave: Yes, Cobol is that evil. The period closes all previ

[il-antlr-interest: 24165] Re: [antlr-interest] Again Cobol:

2009-06-11 Thread Dave Dutcher
I'm new to Antlr myself, so maybe you already know everything I'm going to suggest. So your grammar has trouble with input like if A == B then move Y to Z move X to Y. And you're suggesting that the parser should just consume the move X to Y as part of the if statement, even though it could a

[il-antlr-interest: 24001] Re: [antlr-interest] Reverse Iterate over String Template

2009-06-03 Thread Dave Dutcher
I am new to string template too, but I don't think there is anyway to apply a template to a multi valued attribute in reverse. Its easy to work around though, just reverse your data before you add it to the string template object. You can use Array.Reverse() for arrays and lists have a Reverse()

[il-antlr-interest: 23974] Re: [antlr-interest] Regarding lexer rules return values

2009-06-02 Thread Dave Dutcher
Is there a reason you can't make LEXERRULE a parser rule? parserrule: (parserrule2); parserrule2: (LEXERRULE1) (LEXERRULE2) (LEXERRULE3); Then you can do exactly what you want. Dave _ From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-boun...@antlr.org] On Behal

[il-antlr-interest: 23339] Re: [antlr-interest] case-insensitive parsing

2009-04-23 Thread Dave Dutcher
Hi, I'm also fairly new to Antlr, but I would suggest improving how the lexer handles your comments. I don't think case insensitivity is your problem, because it sounds like that is working fine. I think your problem is that you are trying to parse arbitrary english in the comment which is amb

[il-antlr-interest: 22936] [antlr-interest] Bug in Python Filter Lexers

2009-04-01 Thread Dave Dutcher
Hello, I am writing a lexer grammar with Antlr 3.1.3, and I've turned the filter option turned on and I'm targeting Python. I tried to set the text of a particular token calling self.setText in an action. The token I wanted to change is changed, but every token in the stream after that point is

[il-antlr-interest: 22815] Re: [antlr-interest] How can I insert an action when a su-brule failsas well as when this is not present?

2009-03-27 Thread Dave Dutcher
> From: Gabriel Petrovay > Subject: [antlr-interest] How can I insert an action when a su-brule failsas well as when this is not present? > > Hi, > > I would like to perform a custom action when a subrule fails (=does not match). > > For example: > r : sr1 { /* action when sr1