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
"nested" parsers
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1999-12-03 (13:54)
From: Hendrik Tews <tews@t...>
Subject: Re: "nested" parsers

Georges Mariano writes:
   Date: Thu, 02 Dec 1999 13:25:04 +0000
   Subject: "nested" parsers
   
   It appears that we can divide the language L in a few "sub"-languages.
   Let's say that  L3 <: L2 <: L1 = L   ('<:' included in )
   
   And we would like to have one entry point for each language
   in our parser.

ocamlyacc generates a parsing function for echa start symbol that
you declare in the grammar file. Therefore the easiest way (if
possible) is that you rewrite your grammar, such that for each of
the languages Ln you have one metasymbol, which generates this
language. Then you include several start directives in the header
of the grammar file.

Bye,

Hendrik