[antlr-interest] Places where Antlr can be used ....

Prashant Deva prashant.deva at gmail.com
Fri Jun 24 07:55:01 PDT 2005


On 6/24/05, Octavian Nita <octavian_nita_2004 at yahoo.com> wrote:
> Hello everyone!
> 
> This is still an ideea for translators/compilers area:
> 
> While I was trying to finish a preliminary version of
> a translator from Lua to Java (about 2 weeks ago),
> because Lua is a fairly simple procedural language
> (most of it, excluding closures...) I had an ideea
> about how to make a lexer and a parser for what I've
> called Common Procedural Language Subset; basically,
> this is comprised (in my mind, for now :)) in 2
> grammars, one for the lexer and one for the parser for
> some basic/common constructions used is most
> programming languages, that can be inherited and hence
> extended.... I mean, all languages (or most of them)
> have some form of assignment (whether it is plain '=',
> or set-q, or something else, anyway I'd go with '=',
> because I thought the susbset for procedural
> languages...); also most of the languages have a long
> form of comment and a short one, and the mechanism for
> matching them is the same, only the delimiters differ
> (maybe it would be nice a way to set them and to get
> the grammar as output... :)) (I guess you all know
> what I'm talking about); also most identifiers start
> with _ or letter and continue with _, letter and
> digit... AND SO ON....
> 

I already have something in Antlr Studio somewhere alogn the lines of
what you are saying.
Look at the vide of lexer wizard. It is entirely based on that idea
that almost all languages have single and multi lien comments,
identifiers of a common type ,and string literals.
You just have to specify the delimeters and token names for these in
the wizard and the lexer is created for you.

Thus a lexer which would usually take hours and be riddled with bugs,
can be built in under a minute.

PRASHANT
http://antlrstudio.com


> The ideea is to catch all these patterns in procedural
> languages and to make something to start upon...
> 
> I didn't read the other replies on this topic and if I
> had the same idea as anyone else, but later, I do
> appologise for repeating...
> 
> Anyway, I don't claim this ideea :))
> Respect, Tavi.
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>


More information about the antlr-interest mailing list