[il-antlr-interest: 27019] [antlr-interest] How to skip to end of line on error?

2009-11-28 Thread Rick Schumeyer
I've read the section on error reporting and recovery from "the book" but still can't figure out what may be a simple problem. I want to parse a file that consists of bibliographic entries. Each entry is on one line (so each record ends with \n). If a record does not match, I just want to print

[il-antlr-interest: 27018] Re: [antlr-interest] ST visualizer GUI prototype

2009-11-28 Thread Terence Parr
On Nov 28, 2009, at 1:08 PM, Sam Harwell wrote: > No need for a serialization protocol for C# - I already have ST4 > ported > locally and can build a GUI even easier with WPF/data binding. ha! cool. i'm going to clean it all up a bunch so might not want to follow too closely behind me. GUI

[il-antlr-interest: 27017] Re: [antlr-interest] ST visualizer GUI prototype

2009-11-28 Thread Sam Harwell
It wouldn't be too much different from my AST Explorer that I wrote about in April: http://www.antlr.org/pipermail/antlr-interest/attachments/20090423/97705 305/attachment.png Let me know when you have the current version in P4 and I can work on something similar. Sam -Original Message-

[il-antlr-interest: 27016] Re: [antlr-interest] ST visualizer GUI prototype

2009-11-28 Thread Sam Harwell
No need for a serialization protocol for C# - I already have ST4 ported locally and can build a GUI even easier with WPF/data binding. Sam -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-boun...@antlr.org] On Behalf Of Terence Parr Sent: Saturday, November

[il-antlr-interest: 27013] [antlr-interest] ST visualizer GUI prototype

2009-11-28 Thread Terence Parr
well, that was easy. 5 or 6 hours cutting/pasting from web and I have an initial prototype ST viewer. It shows tree of template evals on left, template eval stack on lower left, attributes to the right of that, output on top right, and template pattern on lower right. As you click around

[il-antlr-interest: 27012] Re: [antlr-interest] Rule parameter troubles

2009-11-28 Thread Jim Idle
When you use the predicate, it is being hoisted into other rules, where it is out of context. So, rather than pass as a parameter, use in a scope at a high enough rule level and then use the scope reference in your predicate. Also, if you can, allow all syntax through in the parser even if it

[il-antlr-interest: 27011] [antlr-interest] Rule parameter troubles

2009-11-28 Thread Andrew Bradnan
I was trying to use a rule parameter and can't call another rule with that parameter when I use +. An example will make more sense. test [bool wtf] returns [int n]: {$wtf}?=>'wtf' test2[$wtf]+;// attribute is not a token, parameter, or return value: wtf test [bool wtf] returns [int n]:

[il-antlr-interest: 27010] Re: [antlr-interest] same char but different context

2009-11-28 Thread Jim Idle
Hard to tell what the format is from this, but presumably each new single character type introducer is the first non-whitespace after a newline. If this is the case then you need to take the lexer tokens out of the tokens section and create real LEXER rules that have a predicate based on a Boole

[il-antlr-interest: 27008] [antlr-interest] same char but different context

2009-11-28 Thread codeman
Given is a record-per-line format like this: => single letter => any except end-of-line => end of line My problem is the following: WHello World "W" => recognized as single char "Hello " is broken, W seems to be a new start char Here is my grammer. Aimed target is to parse a quicken inter