Jochen's Sliding Picture Puzzle. Information about and download of Jochen's Sliding Picture Puzzle. … read more

Mathematical Homepage of Jochen Voss. I am a mathematician, interested in probability, statistical computing and applied mathematics. This page gives an overview over some of my mathematical interests. … read more

Blog: LaTeX: calling a macro for every line of input. How to call a LaTeX macro for every line in an environment? … read more

Wisent release 0.4

By , on [atom feed]

Today I completed version 0.4 of the Wisent parser generator for Python. The program is now efficient enough to deal with grammars of the size of the C grammar.

I spent some effort on generating useful error messages for grammar conflicts. For example the usual "if-else conflict" in the C grammar is reported as follows:

cg.wi:164:61: shift-reduce conflict: the input
cg.wi:164:61:     IDENTIFIER { if ( IDENTIFIER ) ;.else ...
cg.wi:164:61:   can be shifted using the production rule
cg.wi:164:61:     selection_statement: if ( expression ) statement.else statement;
cg.wi:164:25:   or can be reduced to
cg.wi:164:25:     IDENTIFIER { selection_statement.else ...
cg.wi:164:25:   using the production rule
cg.wi:164:25:     selection_statement: if ( expression ) statement;
cg.wi: 1 conflict, aborting ...

Now you can even tell Wisent to ignore this conflict by placing an ! before the offending else.

This is an excerpt from Jochen's blog.
Newer entry: A fast numerical algorithm for the estimation of diffusion model parameters
Older entry: Efficient LR(1) Parsers

Copyright © 2008, Jochen Voss. All content on this website (including text, pictures, and any other original works), unless otherwise noted, is licensed under a Creative Commons Attribution-Share Alike 3.0 License.