Browse thread
[Caml-list] Calling ocamlyacc from ocamlyacc
-
katre
-
Michal Moskal
-
katre
- Michal Moskal
- Hendrik Tews
- skaller
-
katre
-
Michal Moskal
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Michal Moskal <malekith@p...> |
| Subject: | Re: [Caml-list] Calling ocamlyacc from ocamlyacc |
On Tue, Sep 02, 2003 at 11:23:40AM -0400, katre wrote:
> Michal Moskal wrote:
> >
> > You can define several start symbols in your grammar. Parsing functions
> > are defined for each. You can also define several rule ... in your lexer
> > (lexing functions are defined for each). Hope that helps, I can't help
> > more, since I don't quite understand nature of your problem.
> >
>
> Right, but is there a way, in a ocamlyacc action, to switch which lexer
> rule you're using? That seems to be the main part I am missing. Or if
> I could access the lexbuf directly, I could also use that.
I believe you can set some flag in lexer (from parser action), to make
it switch for another rule. But you have to consider lookahead.
--
: Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv
: When in doubt, use brute force. -- Ken Thompson : {E-,w}-- {b++,e}>+++ h
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners