[antlr-interest] Embedded Code

Gavin Lambert antlr at mirality.co.nz
Wed Sep 5 01:33:20 PDT 2007


At 20:20 5/09/2007, Mohammed Ibrahim Mohammed wrote:
>How are you All ?  i am looking forward to extend antlr to 
>generate for me parsers according to a grammar but targeted The 
>MCU of the specific microcontroller using its Specific C Library 
>.....
>
>Any one has a solution , Professor Terence Parr told me something 
>about the string Templates , but all i need is steps to follow , 
>anybody can tell me steps to follow to modify my antlr tool to 
>generate parsers targeted to the Specific MCU Microcontroller i 
>am working on .

That depends on exactly what you're trying to do.  If you're 
trying to create a parser that runs on your host computer and 
generates source code to be compiled into a program that runs on 
your target microcontroller, then StringTemplate could be a good 
way to go, or you could just hand-roll some useful output from 
embedded actions or a generated AST.

If you're trying to create a parser that itself runs on your 
target microcontroller, then your best bet would be to use ANTLR's 
C target, since almost everything can compile standard C.  (If 
you've got a higher-end microcontroller you might be able to use 
Java instead.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070905/fe737764/attachment-0001.html 


More information about the antlr-interest mailing list