X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=utils%2Fgenprimopcode%2FLexer.x;h=6f48c02f8ff493c48330fca9ad4583801834c17b;hb=46176dfa4f329af687c92e57740c800a6cada7b1;hp=ac1ea95ce75b10758e518d317dbb5b502fd1eef1;hpb=7d6363d661b5a9e98539c6c2e8002f754b89f20c;p=ghc-hetmet.git diff --git a/utils/genprimopcode/Lexer.x b/utils/genprimopcode/Lexer.x index ac1ea95..6f48c02 100644 --- a/utils/genprimopcode/Lexer.x +++ b/utils/genprimopcode/Lexer.x @@ -1,6 +1,7 @@ { -{-# OPTIONS -w #-} +{-# LANGUAGE BangPatterns #-} -- required for versions of Alex before 2.3.4 +{-# OPTIONS -w -Wwarn #-} -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and fix -- any warnings in the module. See @@ -53,6 +54,7 @@ words :- <0> "thats_all_folks" { mkT TThatsAllFolks } <0> [a-z][a-zA-Z0-9\#_]* { mkTv TLowerName } <0> [A-Z][a-zA-Z0-9\#_]* { mkTv TUpperName } + <0> [0-9][0-9]* { mkTv (TInteger . read) } <0> \" [^\"]* \" { mkTv (TString . tail . init) } [^\{\}]+ { mkTv TNoBraces } \n { mkTv TNoBraces }