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
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
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-
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
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
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
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]:
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
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