Hi,
I'm doing pretty well recognizing LaTeX commands, but now I'm at the
stage where I want to capture the "text". I'm having trouble defining
"everything else".
Basically, I currently define LaTeX as
commands (as I define them), possibly separated by WS, and everything
that's not a command is
I'm sorry, you did tell me how to fix it!
On 6/22/2010 11:59 AM, John B. Brodie wrote:
> Greetings!
>
> On Tue, 2010-06-22 at 11:08 -0400, Pavel Grinfeld wrote:
>
>> Hi,
>>
>> I'm begging to get my bearings on this But the following gives two
>> "multiple alternatives" warnings.
>>
>> How
> The lexer rule should be...
> ED: .;
> Dot will match any one character. Then it works as expected.
Thanks for your insight...I'm off and running again! It seems so obvious now
that you showed me ;)
Back to the TDAR book and thinking how the wide-open-lexer-rule-plus-predicate
validation ca
Greetings!
On Tue, 2010-06-22 at 11:08 -0400, Pavel Grinfeld wrote:
> Hi,
>
> I'm begging to get my bearings on this But the following gives two
> "multiple alternatives" warnings.
>
> How come?
>
> Many thanks in advance,
>
> Pavel
>
> grammar PGTeX;
>
> doc
> :
> (a=text{System.o
Hi,
I'm begging to get my bearings on this But the following gives two
"multiple alternatives" warnings.
How come?
Many thanks in advance,
Pavel
grammar PGTeX;
doc
:
(a=text{System.out.print(">"+$a.value+"<");}|b=command{System.out.print($b.value);})+
EOF;
command returns [ Strin
Hi,
Is it always clear cut whether to call something a token or make it part
of grammar.
For example, suppose we are parsing TeX and a command is something that
looks like this:
\name{stuff}
Should "command" be in the lexer section or grammar section?
Sorry for such a vague question, but I a
Greetings!
On Tue, 2010-06-22 at 04:22 -0400, Pavel Grinfeld wrote:
> Hi,
>
> Here's my first attempt at an ANTLR project. For practice, I just want
> to read a file with lowercase words and print them. I feed it "hi there
> how are you"
> All that the program prints is "hi".
>
> Many thanks i
2010/6/21 Bart Kiers :
> Yes, lots of people.
> Regards,
> Bart.
Recently I don't get any mail
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed
2010/6/22 Pavel Grinfeld :
> grammar pg;
Grammar pg compiling OK, but in html.g we have
class HTMLParser extends Parser;
options {
exportVocab=HTML;
k = 1;
}
and compiler not works...
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mai
Hi,
Here's my first attempt at an ANTLR project. For practice, I just want
to read a file with lowercase words and print them. I feed it "hi there
how are you"
All that the program prints is "hi".
Many thanks in advance,
PG
grammar pg;
doc
:a = word {System.out.println($a.value);} ( WS b
10 matches
Mail list logo