Subj : Re: Parser generators for a simple language form. How? To : comp.programming From : Jon Harrop Date : Wed Aug 03 2005 02:09 am Jon Ripley wrote: > This has been bugging me for a while and I'd appreciate some input. > > I have a number of simple scripting languages of similiar specifications > that I use for rapid application development that I would like to make > available to a wider audience. The wider audience use whichever > operating system they want to on whatever platform they purchased. > > Currently they are all implemented in a non-portable language and whilst > they suit my current needs perfectly they are of limited use to others > and need to be recoded in a portable language to be compiled for > whatever OS/platform any given user may want to use them on. My first > choice for the portable language is C and these will all be command line > tools. > > I would like to use a tool to generate the parser for each language, This is quite timely. I implemented a new language in OCaml. I used ocamllex and ocamlyacc to generate the lexer and parser and the interpreter is a small OCaml function. The whole project has so far taken me about 10hrs of work, over 2 days. So my advice would be to use ML (I like OCaml but there is also SML) because it is specifically designed for this and will make your life enormously easier. However, there is the "activation barrier" of having to learn ML. If you're ever going to do this again, then I definitely think it is worth going the ML route. -- Dr Jon D Harrop, Flying Frog Consultancy http://www.ffconsultancy.com .