Version française
Home     About     Download     Resources     Contact us    
Browse thread
another question on lexer function
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Olivier Pons <opons@a...>
Subject: another question on lexer function
	hello !

is it forbidden  to use the ";;" token  in a make_lexer function ?

as  the silly exemple below suggests:

#let lexer = make_lexer [ "titi"; "::";";;"; "toto"];;
lexer : char stream -> token stream = <fun>
#let token_stream = lexer(stream_of_string "toto ;; titi");;
token_stream : token stream = <abstr>
#stream_next token_stream;; 
- : token = Kwd "toto"
#stream_next token_stream;; 
Uncaught exception: Parse_error


thanks in advance,

Olivier