Lin wrote:
> On Apr 15, 12:28 am, Marc Haisenko <[EMAIL PROTECTED]> wrote:
>   
>> IMHO not a good idea. You will waste most of the time writing/debugging the
>> parser instead of the Vim part (plus all the time you need to solve problems
>> related to the parser and the grammar). Don't reinvent the wheel when there's
>> one that might suit your need sufficiently well.
>>
>> Writing a parser seems not that hard at first, but how many have you written
>> so far ? It really is not an easy task and that's why yacc/bison is still so
>> popular despite it having some limitations.
>>
>> Plus writing a grammar for C sounds as joyful as driving a glowing steel rod
>> through your private parts, considering all its ambiguities.
>>         Marc
>>     
>
> I agree. In fact I'm not for a new parser either. I wrote an LALR
> compiler as a course project some years ago. Debugging the grammar is
> really painful, even for a very limited subset of C. Ambiguity is
> quite hard to figure out and solve.
>   
That book I mentioned that I have on writing a LALR, yacc-like parser is 
at home; I'll try to remember to find its ISBN (and title).  It does 
happen to be written in C; if the authors would be amenable, perhaps it 
could be imported and perhaps modified to support incremental grammar 
checking (and lexical analysis and type checking and symbol table and 
...).  The advantage of it is that there is, in fact, an entire book on 
it, so its well documented.

Regards,
Chip Campbell


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui