English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: [Caml-list] ocamlyacc -- can i tell it to be quiet?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-11-18 (16:26)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] ocamlyacc -- can i tell it to be quiet?
On Fri, 2005-11-18 at 15:40 +0100, yoann padioleau wrote:

> except that sometimes there is some space, comments, between the 2 "long", 
> so the regexp for "long long" would
> be uselessly complicated. 

Yes, but I have a token filter sitting in between the lexer
and parser anyhow .. I just forgot about it. It already chucks
out comments and spaces. It's there for the reason you mention .. 
and also because it is cheaper (lexers get rather large if you 
give them too much work).

> BTW, I dont know if your grammar talks about C, but in C you can even write
>  "long const extern long a;"

The grammar in question is the Felix grammar, which is a kind
of hybrid syntax between C++ and ML. It make no pretense
of being an upgrade of C++ syntactically .. however I do
try to keep enough familiar things in it that it won't
be quite as scary as Ocaml or Haskell.

Felix uses "vlong" for C's "long long" .. not hard to 
learn, but every new thing you have to learn is a barrier
to acceptance.

John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net