I did some work with flex++ and bison to produce a basic lexer/parser for abc, along with
some c++ classes.  I stopped that development once I started using javacc (a recursive
descent compiler-compiler) for Java, which gave me a lot more useful tools for the job.

A particular problem that needs to be solved for any usable abc application that runs interactively
is to allow the user to take a long file which contains both standard-conforming abc and
deviant abc (either application specific or just never been run through an application),
and present it in a usable fashion.   In other words, if I want tune 57, but tunes 10, 45, 51 are
broken, don't make me fix everything previous just to get tune 57.   I found it reasonably
straightforward to implement exception handling in Skink using javacc that let me do that,
but not in flex/bison (though I will admit to not spending more than about 3 weeks on it)

Why isn't anybody else using Java?  

wil

Bob Archer wrote:
"I. Oppenheim" <[EMAIL PROTECTED]> wrote:

  
I do not know whether Lex and Yacc are the proper tools
to deal with ABC.
    

I don't know about *the* proper tools, I think they're perfectly 
appropriate tools for handling ABC. As has already been pointed out, 
all of the problems you mention will have to be handled however a 
developer chooses to parse the input. They're problems with the 
underlying language specification.

One of the advantages of using an automatic parser generator like lex 

and yacc is that it'll tell you if the specification is ambiguous. If 

the new ABC standard is too complex or ambiguous to be parsed by yacc 

and lex I suspect that developers will have a hard time writing 
correct parsers by hand.

If anyone's interested I made a start on yacc and lex (actually flex 
and bison) parsers for abc. I'll happily email them to anyone who 
wants them.

Bob


----------------------------------------------------------
-- Bob Archer      [EMAIL PROTECTED]

To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html

  

Reply via email to