Showing posts with label LEX. Show all posts
Showing posts with label LEX. Show all posts

Monday, May 19, 2008

Pargen for YACC and LEX

The YACC and LEX libraries that Cello links against come from Pargen. Pargen is a YACC and LEX distribution for use on Windows. Cello was supplied with the Pargen libraries without source. Fortunately Bumble Bee Software have the sources to their previous release of their Pargen library available for download. Checking the source headers against the headers that were included with the Cello code I can see that they are the same. The Pargen library compiled almost without problem.

Saturday, May 17, 2008

JavaScript with YACC and LEX

Pressing on with Cello I have started compiling the files that are responsible for the implementation of ECMA script (JavaScript).

Inheriting a code base is a whole set of surprises one of which is that Cello has its own JavaScript interpreter built in. I have some experience of working with SpiderMonkey and have looked at the JavaScript interpreter that is built into WebKit. Implementing a JavaScript interpreter is not a small job - and as with most of the Cello code it is well written and easy to understand. Down the line when everything is working (quite a distant point) I may remove it and instead use the WebKit implementation of JavaScript - I don't have any immediate desire to do this - instead I am very much following the path of least resistance.

At the moment the easiest route is to get it to compile and build. Thus far, working through the code file by file, the code compiles with few errors - typically four or five per file and I have so many clean runs (files with no errors) that I look forward to the ones with problems to fix. The biggest issues I have had (so far) is the absence of _fpclass, but the equivalent fpclassify seems to fit the bill.

For fun and games down the line Cello links against Bumble-Bee Software's Pargen YACC and Lex libraries. The source of these libraries is available (though not included in my Cello sources). Building these seems quite possible.