From: jean-david hsu <jhsu1@email.sjsu.edu>
To: caml-list@yquem.inria.fr
Subject: I don t get the lexer
Date: Sun, 12 Feb 2006 17:33:06 +0000 [thread overview]
Message-ID: <43EF7152.6080307@email.sjsu.edu> (raw)
Hello everyone
how come my lexer does not break "?!" both defined as keywords but puts
"." aside?
# let lexer = make_lexer [".";"!";"?"];;
val lexer : char Stream.t -> Genlex.token Stream.t = <fun>
# let token_stream = lexer(Stream.of_string "hello! but ?! but!?. . jhg.");;
val token_stream : Genlex.token Stream.t = <abstr>
# Stream.next token_stream;;
- : Genlex.token = Ident "hello"
# Stream.next token_stream;;
- : Genlex.token = Kwd "!"
# Stream.next token_stream;;
- : Genlex.token = Ident "but"
# Stream.next token_stream;;
- : Genlex.token = Ident "?!"
# Stream.next token_stream;;
- : Genlex.token = Ident "but"
# Stream.next token_stream;;
- : Genlex.token = Ident "!?"
# Stream.next token_stream;;
- : Genlex.token = Kwd "."
# Stream.next token_stream;;
- : Genlex.token = Kwd "."
# Stream.next token_stream;;
- : Genlex.token = Ident "jhg"
# Stream.next token_stream;;
- : Genlex.token = Kwd "."
JD
___________________________________________________________________________
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com
next reply other threads:[~2006-02-13 1:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-12 17:33 jean-david hsu [this message]
2006-02-14 7:55 ` [Caml-list] " Nicolas Pouillard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43EF7152.6080307@email.sjsu.edu \
--to=jhsu1@email.sjsu.edu \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox