[GTALUG] Online Course for Lex/Yacc?

Alvin Starr alvin at netvel.net
Mon Sep 17 16:08:40 EDT 2018


On 09/17/2018 03:35 PM, William Park via talk wrote:
> On Mon, Sep 17, 2018 at 08:54:29AM -0400, Matthew Gordon via talk wrote:
>> I'd also recommend against Yacc. As others have said, it's a great tool and
>> very powerful but a recursive descent parser will do the job 99% of the
>> time and will be much easier. Writing a good unambiguous grammar for Yacc
>> can be tricky and is much more difficult to debug than a recursive descent
>> parser. A lot of languages now have "parser combinator" libraries which
>> make it even easier to write a recursive descent parser. I'd do a google
>> search to see if there's one available for your programming language of
>> choice.
> Language is C; environment is embedded board of consumer/business
> printers; and, the nature of work is QA, where I'm trying to introduce
> more automation.  So, for C, what parser library would you use?  I take
> it, there is difference between "parser generator" and "parse
> combinator".
Having worked in building and supporting compilers years ago I would 
argue the Yacc and Lex are a better way to build a parser because it 
forces you to think a bit about design.
I tend to like tools that have a formal underpinning and work with a 
design over ad-hoc systems where the result is directly tied to the 
ability of the programmer to think ahead and avoid problems.

It sounds like your looking to try and build a domain-specific language 
and you may have more luck with finding an existing language that you 
can use.

Building and maintaining a programming language can quickly become a 
full time job and is an amazingly thankless job.



-- 
Alvin Starr                   ||   land:  (905)513-7688
Netvel Inc.                   ||   Cell:  (416)806-0133
alvin at netvel.net              ||



More information about the talk mailing list