From: "Christopher Nelson" To: Subject: Re: Scripts Date: Wed, 9 Jun 1999 10:23:51 -0600 Message-ID: <01beb294$760b2b60$LocalHost@thendren> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Reply-To: djgpp AT delorie DOT com > >I actually found it to be easier to just write my own lexical parser and >such. The time it would take to learn Bison and Flex would take longer than >to just write your own anyhows. > >Sean Middleditch you only have to learn Bison and Flex once. then you can right LALR grammars to your heart's content. it's faster, easier, and tons more efficient since compiler design IS one area that tremndoes R&D has been applied. GCC is an exampe of this. the other point is that, Bison and Flex come from Lex and YACC, so if you write your grammars in them, odds are very good that they'll be VERY portable. in addition, my Lex grammar for a compiled scripting langauge I wrote is about 80 lines. I don't think that you're going to duplicate that using a hand-coded lexer. a final point is efficiency. there are things that make program-generated parsers and lexers a tremendous advantage over hand-coding: plain speed and flexibility. the only real benefit hand-coding gives is control over size: e.g. the calculator in RHIDE. -={C}=-