[antlr-interest] Re: Questions about learning ANTLR

mzukowski at yci.com mzukowski at yci.com
Mon Oct 7 13:09:31 PDT 2002


It doesn't really matter unless you split up your lexer and parser into
separate .g files, as you might if you have one lexer that is used by
several parsers.
 
Monty

-----Original Message-----
From: Hensley, Richard [mailto:richard.hensley at mckesson.com]
Sent: Monday, October 07, 2002 12:44 PM
To: 'antlr-interest at yahoogroups.com'
Subject: RE: [antlr-interest] Re: Questions about learning ANTLR



A follow up question: 

Does it matter where the tokens section is placed? 
In otherwords, is there a significant functional difference between placing
tokens for literals in the parser or in the lexer?

Richard 

-----Original Message----- 
From: Terence Parr [ mailto:parrt at jguru.com <mailto:parrt at jguru.com> ] 
Sent: Monday, October 07, 2002 11:37 AM 
To: antlr-interest at yahoogroups.com 
Subject: Re: [antlr-interest] Re: Questions about learning ANTLR 



On Monday, October 7, 2002, at 10:47  AM, mzukowski at yci.com wrote: 

> I think you're right, it sounds like a mistake. 

This bit me just last night myself.  Option is actually the "tokens 
{...}" option, right not literals {...}? ;) 

Ter 
> 
> Monty 
> 
> -----Original Message----- 
> From: Hensley, Richard [ mailto:richard.hensley at mckesson.com
<mailto:richard.hensley at mckesson.com> ] 
> Sent: Monday, October 07, 2002 9:51 AM 
> To: 'antlr-interest at yahoogroups.com' 
> Subject: RE: [antlr-interest] Re: Questions about learning ANTLR 
> 
> 
> Monty, 
> I use the "testLiterals" option in my grammar's. However, I was 
> referring to 
> the "literals" option as indicated in this sentence that is just 
> before the 
> one that refers to the "testLiterals" option. 
> "Second, literals may be specified in the lexer grammar by means of the 
> literal option." 
> The word literal is a link, and refers to "options.html#literal" which 
> is 
> not on options page. I don't think it exists, and is a mistake in the 
> documentation. 
> I would be happy to give some opinionated feedback about how the web 
> site 
> could be structured. I will put some thought into it. 
> Richard 
> -----Original Message----- 
> From: mzukowski at yci.com [ mailto:mzukowski at yci.com
<mailto:mzukowski at yci.com> ] 
> Sent: Monday, October 07, 2002 9:40 AM 
> To: antlr-interest at yahoogroups.com 
> Subject: RE: [antlr-interest] Re: Questions about learning ANTLR 
> 
> 
> It's at http://www.antlr.org/doc/options.html#_bb8
<http://www.antlr.org/doc/options.html#_bb8> . 
> By the way, Ter (and I'm gonna help) is about to embark upon a 
> restructuring 
> 
> of the docs and website.  It would help a lot if you could explain how 
> the 
> documentation should be, in your opinion. 
> Monty 
> -----Original Message----- 
> From: Hensley, Richard [ mailto:richard.hensley at mckesson.com
<mailto:richard.hensley at mckesson.com> ] 
> Sent: Monday, October 07, 2002 8:45 AM 
> To: 'antlr-interest at yahoogroups.com' 
> Subject: RE: [antlr-interest] Re: Questions about learning ANTLR 
> 
> 
> Monty, 
> Thanks for the link. When I read that chunk of documentation, I 
> interpreted 
> it to mean any double quoted string, including those specified in a 
> tokens 
> section. It turns out that I got lucky I guess, because double quoted 
> strings in a tokens section are placed in the literals table. All that 
> being 
> 
> said, I'm not sure it matters whether double quoted string literals are 
> specified in the tokens section, or inline. On examining the code, 
> I've been 
> 
> unable to find sigficant function differences. 
> BTW, I was unable to find the literal option referred to in the 
> documentation. Do anybody know what it is? 
> Richard 
> -----Original Message----- 
> From: mzukowski at yci.com [ mailto:mzukowski at yci.com
<mailto:mzukowski at yci.com> ] 
> Sent: Monday, October 07, 2002 8:01 AM 
> To: antlr-interest at yahoogroups.com 
> Subject: RE: [antlr-interest] Re: Questions about learning ANTLR 
> 
> 
> http://www.antlr.org/doc/lexer.html#_bb7
<http://www.antlr.org/doc/lexer.html#_bb7>  
> -----Original Message----- 
> From: Hensley, Richard [ mailto:richard.hensley at mckesson.com
<mailto:richard.hensley at mckesson.com> ] 
> Sent: Friday, October 04, 2002 4:40 PM 
> To: 'antlr-interest at yahoogroups.com' 
> Subject: RE: [antlr-interest] Re: Questions about learning ANTLR 
> 
> 
> Monty, 
> Where in the documentation does it talk about keywords being specified 
> as 
> literals? I want to check it out to make sure I didn't screw up my 
> grammars, 
> 
> and give bad advice. 
> Richard 
> .... 
> 
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/ <http://docs.yahoo.com/info/terms/>  
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
> 
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/ <http://docs.yahoo.com/info/terms/>  
> 
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
> 
> 
> 
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/ <http://docs.yahoo.com/info/terms/>  
> 
> 
-- 
Co-founder, http://www.jguru.com <http://www.jguru.com>  
Creator, ANTLR Parser Generator: http://www.antlr.org <http://www.antlr.org>

Lecturer in Comp. Sci., University of San Francisco 


  

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
<http://docs.yahoo.com/info/terms/>  


Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> . 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20021007/c34b01bc/attachment.html


More information about the antlr-interest mailing list