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
yacc style
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-01-28 (02:28)
From: Erik de Castro Lopo <ocaml-erikd@m...>
Subject: Re: [Caml-list] yacc style
On 28 Jan 2005 12:14:39 +1100
skaller <skaller@users.sourceforge.net> wrote:

> On Fri, 2005-01-28 at 08:39, Erik de Castro Lopo wrote:
> >
> > Yes, normally the parser generates a parse tree which is then
> > passed to the semantic analyser for semantic checking.
> Unfortunately this is useless in the common case
> of needing to parse C.

I'm happy to take your word for it John, but I'd like to know

> It would surely be nice
> to be able to pass an argument to ocamlyacc,
> as can now be done for ocamllex.

Could you give a example?

> Strangely in this case the ideal place to add
> on  the typedef table would be the lexbuf,

Ok, so this enables you to know at lex time if an identifier is 
a user type avoiding ugly parser hacks to work around the fact
that identifier X is actually a user defined type.

Am I on the right track here?

  Erik de Castro Lopo  nospam@mega-nerd.com (Yes it's valid)
"life is too long to know C++ well" -- Erik Naggum