Add lexer support for comments.

This commit is contained in:
2011-01-13 11:26:47 -08:00
parent 5d0a3fc510
commit bd16ce00f2
2 changed files with 3 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
module Data.List
/* This is a comment */
export datatype List a =
NULL()
| (:)(a,List a);

View File

@@ -21,14 +21,14 @@ $bindigit = [01]
$typestart = [A-Z\_]
$valstart = [a-z\_]
$identrest = [a-zA-Z0-9\_\.]
$opident = [\~\!\@\#\$\%\^\&\*\+\-\=\.\:\<\>\?\/\_]
$opident = [\~\!\@\#\$\%\^\&\*\+\-\=\.\:\<\>\?\_]
$escape_char = [abfnrtv'\"\\]
:-
-- Whitespace
$white+ ;
"--".* ;
"/*".*"*/" ;
-- Numbers
$decdigit+ { emitS (buildInt 10) }