Hi all, I'm trying to write a generic parser similar to the buidlExpressionParser in the haskel library (without using external libraries). I came up with a kind of hack that uses the grammar extension mechanism (attached). Is there a better way of doing this ? And an other question: at the moment I'm using ( Plexer.gmake () ) as a lexer, but I don't need it (too restrictive and doesn't lex tokens like "[]" ). Does anybody have an example on how to write a simple lexer that I can use instead ? :) p compile with: ocamlfind ocamlc -c -pp "camlp4o -I . pa_extend.cmo q_MLast.cmo " -I /usr/lib/ocaml/3.08.3/camlp4 datatype.ml inputParser.ml ocamlc /usr/lib/ocaml/3.08.3/camlp4/gramlib.cma datatype.cmo inputParser.cmo main.ml -- ++ Blog: http://blog.rsise.anu.edu.au/?q=pietro ++ ++ "All great truths begin as blasphemies." -George Bernard Shaw ++ Please avoid sending me Word or PowerPoint attachments. See http://www.fsf.org/philosophy/no-word-attachments.html