[dev] Lexers and parsers

From: Maurício <mauricio.antunes_AT_gmail.com>
Date: Mon, 17 Aug 2009 21:27:43 -0300

(I'm asking this here because you share my view on how software
should be. Please warn me if this is off-topic.)

I've always been a fan of using the unix text input and output
to connect simple tools to achieve complex results, but I think
there's a missing piece in the tool set: parsers.

There are many situations where we need to deal with complex
input, and tools like lex, yacc and relatives are helpfull. If
such tools were to be used in shell script, the input of yacc
would have to be an actual script instead of behaving like a
template. yacc allows you to call complex functions to deal with
interpreted data, but such scripts would have to call unix tools,
maybe like printf to get output that could easily be parsed by sed
or awk, or maybe tools to actually do actions.

I've been thinking on how to implement such tool. Since I'm
not a really good developer, I thought about asking people for
sugestions. If you had such "shell yacc", how would you like it
to be or behave? Would BNF be okay, or would you expect something
different? Do you think mimicking lex and yacc as close as
possible would be the best?

Thanks,
Maurício
Received on Tue Aug 18 2009 - 00:27:43 UTC

This archive was generated by hypermail 2.2.0 : Tue Aug 18 2009 - 00:36:01 UTC