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] Notion of lexer state in ocamllex?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Van Horn <dvanhorn@c...>
Subject: [Caml-list] Notion of lexer state in ocamllex?
I'm new to ocamllex and I am trying to translate a lexer written using CUP
(for Java), but I don't understand how parser state is accomplished in
ocamllex.  For example, I have:

<YYINITIAL>"/*" { yybegin(INCOMMENT); }
<INCOMMENT>"*/" { yybegin(YYINITIAL); }
<INCOMMENT>[^\*]+    { }

Any ideas how to do this in ocamllex?  Thanks.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: