Re: Tools for Front End.

"Michael Tiomkin" <tmk@netvision.net.il>
14 Feb 2006 17:42:46 -0500

          From comp.compilers

Related articles
Tools for Front End. asheeshc@noida.hcltech.com (Asheesh) (2006-02-14)
Re: Tools for Front End. tmk@netvision.net.il (Michael Tiomkin) (2006-02-14)
Re: Tools for Front End. asloane@ics.mq.edu.au (Tony Sloane) (2006-02-14)
Re: Tools for Front End. asheeshc@noida.hcltech.com (Asheesh) (2006-02-17)
Re: Tools for Front End. chads_in@yahoo.com (Asheesh) (2006-02-17)
Re: Tools for Front End. grosch@cocolab.de (Josef Grosch) (2006-02-17)
| List of all articles for this month |
From: "Michael Tiomkin" <tmk@netvision.net.il>
Newsgroups: comp.compilers
Date: 14 Feb 2006 17:42:46 -0500
Organization: http://groups.google.com
References: 06-02-102
Keywords: tools, performance
Posted-Date: 14 Feb 2006 17:42:46 EST

Asheesh wrote:
> Hi,
>
> Currently I planning to write a compiler for a very complex grammar
> and I am investigating tools.


    If you'd tell more about the grammar and give a couple of examples,
it will be much easier to find the right tools.


> There are different tools available in the market .e.g yacc, bisson,
> gold, lemnon ,cocoR and more.
>
> The other option I am planning is writting compiler without tools so
> that we can get good performnce.


    Well, most of the computation time of a compiler is spent in lexical
analyzer. On the 2nd place is the backend, so I'm afraid that writing
compiler without tools wouldn't give you much better performance. For
improving a lexer, you can check the "perfect hash" functions.
    BTW, bison is a dialect of yacc.


> Can you please help me what approach I should take to investigate tools
> ? Is you can give me some idea or direction then it would be really
> useful.


  It heavily depends on the grammar of your language. Just two examples
are shown below.


1. C language: a very simple grammar, an existing parser can be found
for every existing tool. Not a context-free language, needs semantic
hacks for typedefs, pointer dereference.


2. English language: a bit more complicated grammar, usually needs
simultaneous translation on several levels, with information exchange
between all the levels.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.