Meta-Meta development log

by Frans

Below the development log of the Meta-Meta project, as I started it on August 24, 2001. It starts with the further development of IParse, a program that I already developed some years ago, in order to build a parser with type-checking abilities for the specification language.

Monday, September 3, 2001

Sources: IParse.c.

Tuesday, September 4, 2001

Sources: IParse.c.

Wednesday, September 5, 2001

Sources: IParse.c.

Thursday, September 6, 2001

Sources: IParse.c.

Friday, September 14, 2001

Sources: IParse.c,

Saturday, September 15, 2001

Sources: IParse.c, SParse.c, and

Sunday, September 16, 2001

Monday, September 17, 2001

Sources: IParse.c and

Tuesday, September 18, 2001

Sources: IParse.c and

Saturday, September 22, 2001

In the past days, I have been considering the idea of integrating IParse with an editor, and also use the parsing for colour coding and automatic reformating. The idea is that after each edit operation the file is reparsed and colour coded according to how far the file was parsed. If the whole file is parsed, the code can be reformated, according to the parse tree. For this to work, it is probably needed to implement some kind of reparsing, which make use of what has already been parsed. Idea is to use the partial solutions stored in solutions. Knowing what has been changed (some characters inserted, deleted, or replaced) we can walk through the the partial solutions an decided which overlap with the changed range. These should then be marked as invalid. The off-set of the solutions after the changed ranged, need to be corrected. If parsing is started over again, most of the partial solutions will be used, except for those in the region that was affected.

If the change consists of a single character removed, added, or changed, it might be a good idea to see if the scanning routine called just before the changed position still scans the same point as before, instead of invalidating the whole parse tree and parse it again.

I have been looking for an appropriate editor to be used. First, I thought about the Scintilla editor component, which is an improved implementation of the RichEditCtrl. The problem that I felt with this, was that it has more functionality then I needed. But a real obstacle is that I cannot easy decorate the internal struction with the partial parse trees. Then I looked at the Edit controls page of the Code Project where I found Crystal Edit - a syntax colouring text editor. After I downloaded it, I discovered that it exactly matched my requirements. It is simple, but has everything you need for source editing. The sources look very clean and well designed. The cources consists of a collection of editor classes, and a sample editor with a MDI interface (which I am using right now for editing this text). And because it doesn't make use of any controls, it gives you full control over the internals.

Although, I am excited about the idea of integrating IParse with Crystal Edit, I do not think it is the right moment. Also it would mean a great diviation from my original development plan. And there is also the practical problem that I need to install Visual Studio first.

Friday, October 5, 2001

Finally, I found some time to continue working on IParse. Sources: IParse.c,,, and upspec.txt.

Monday, October 8, 2001

Tuesday, October 9, 2001

Sources: IParse.c,, and

Friday, October 12, 2001

Friday, October 12, 2001

Sources: IParse.c

November 2001

During this month, I tried to implement a parser for Transact-SQL. For this some extra scanning routines were needed. I decided it was time to implement an easier method for adding scanning functions. The following modifications were made:

Thursday, October 10, 2002

I tried to use IParse for implementing a JavaScript parser. I am getting more and more pages, which are being generated with JavaScript, but which are not checked by my HTML checker, so I was thinking about implementing a JavaScript interpreter for this purpose. I did check the Internet for an available interpreter, but did not find one fitting my purpose.

But when I wrote grammar for JavaScript, I encountered a crash in IParse, caused by tree member of context_entry_p being NULL. I also noticed that in many cases the identifiers were reported to be undefined while they were should have been defined in the context. Because it has been some time that I looked at the code, I was not able to locate the source of these errors.

Friday, October 11, 2002

Sunday, October 13, 2002

Thursday, October 17, 2002

Sources: IParse.c,

Sunday, November 3, 2002

Thursday, November 7, 2002

Sources: IParse.c,

Meta-Meta project