[antlr-interest] First Yggdrasil release

Loring Craymer lgcraymer at yahoo.com
Sat Oct 7 20:47:58 PDT 2006


Kay--

Basically, I modified CharStream to implement the Java CharSequence interface and have another CharSequence class to which data can be copied (I need to clean up CharStream to make this a little more seamless).  There are then mods to build Payloads (Tokens) with a reference to the stream, other mods to Lexer, the codegen grammar, and Java.stg.  (i. e., mostly a bunch of small changes that could be moved into the baseline).

The current implementation has a couple of weaknesses.  The output buffer size is fixed at 20KB, and I don't test for overflow and reallocate (easy enough to do, I just haven't yet).  Character copying code should only appear in rules that have edits; I don't do the analysis to detect that yet so the edit code appears with all character matches--I figure that since I am going to overhaul the grammars when I shift to Yggdrasil in Yggdrasil, it makes the most sense to wait until then to add any analysis support.

--Loring

Kay Roepke <kroepke at classdump.org> wrote: 
On 8. Oct 2006, at 1:12 Uhr, Loring Craymer wrote:

>  6.) Lexical editing (! on characters),

Hi Loring!

Because the file isn't visible yet, a question since I'm impatient:  
How did you implement that? Did you modify the v2 grammars for ANTLR  
and implement the necessary stuff in the runtime, or is it completely  
different and not applicable to v3 main?

cheers,
-k





 		
---------------------------------
Do you Yahoo!?
 Get on board. You're invited to try the new Yahoo! Mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20061007/867b48dd/attachment.html 


More information about the antlr-interest mailing list