Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Camlp4 questions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] Camlp4 questions

>    I changed this by using AFTER "<" instead of AFTER "apply", which
>    seemed to work, but is that the recommended solution?


> Secondly, enclosing the new infix in parentheses to suppress its
> infix status, e.g. "(o)", doesn't work; it still expects an operator
> name. It was easy enough to hack the parser a bit more, but is there
> a nice solution using simple extensions?

Yes, the fact to accept an added infix between parentheses is not
automatic and you have to add a grammar rule to parse that. At the
expr level "simple". It should work, but I have not tested.

> 2. Most of my changes are at the lexical level. Yet the only way I
>    could figure out of changing the lexer was to rebuild the CAML
>    parser in "camlp4/etc/" from scratch with a new lexer and
>    additional modifications. Is it possible to change the lexer but
>    otherwise make only simple extensions? This is for the toplevel,
>    by the way.

The lexer Plexer is not extensible. It is possible to create an
extensible lexer with extensible grammars but the time performances
are very bad. I would like to find a solution to be able to extend it
without slowing down the system, but for the moment, I have no idea...

Bug reports:  FAQ:
To unsubscribe, mail  Archives: