[il-antlr-interest: 29722] Re: [antlr-interest] Mismatched Character, expecting set null

2010-08-07 Thread Ken Klose
Thanks for all of the fantastic help you got me over my initial hurdle and I've been slowly expanding my grammar. I have arrived at a new problem that I can't resolve. I am parsing a rather simple data file and have to read a field that can be a number of the forms 55, +55, -55, or .. in case

[il-antlr-interest: 29723] Re: [antlr-interest] Mismatched Character, expecting set null

2010-08-07 Thread John B. Brodie
On Sat, 2010-08-07 at 04:31 -0400, Ken Klose wrote: I have arrived at a new problem that I can't resolve. I am parsing a rather simple data file and have to read a field that can be a number of the forms 55, +55, -55, or .. in case where no number has been assigned. I've tried the following

[il-antlr-interest: 29724] [antlr-interest] Building a tree grammar expression to recognize arithmetic expressions

2010-08-07 Thread Alex Storkey
Hi, it's my first time posting in a mailing list like this so go easy on me if I'm breaking some etiquette or anything :) I'm trying to construct an expression in my tree grammar to recognize an AST of simple mathematical expressions like 1+(-(a-b)) in tree format of (+ 1 (- (- a b))) that is

[il-antlr-interest: 29725] Re: [antlr-interest] Mismatched Character, expecting set null

2010-08-07 Thread Jim Idle
Unary positive and unary negative are operators usually - you should deal with them in the parser really unless they are not used elsewhere in the grammar. Are you using '.' elsewhere? If you are, you may need to left factor '.'and '..' in to one rule. Jim -Original Message- From:

[il-antlr-interest: 29726] Re: [antlr-interest] Building a tree grammar expression to recognize arithmetic expressions

2010-08-07 Thread Junkman
Hi Alex, Alex Storkey wrote: Hi, it's my first time posting in a mailing list like this so go easy on me if I'm breaking some etiquette or anything :) I'm trying to construct an expression in my tree grammar to recognize an AST of simple mathematical expressions like 1+(-(a-b)) in tree

[il-antlr-interest: 29728] Re: [antlr-interest] Filtering Java expressions

2010-08-07 Thread Bart Kiers
Forgot to reply to the entire group... On Fri, Aug 6, 2010 at 8:03 PM, Bill Andersen bill.ander...@mac.com wrote: Is there a good way to do a partial parse of Java code to pick out declarations (or any other structure). If it helps, I'm limiting this to pretty vanilla Java assignment and