a tool for generating lexical analysers in Haskell, given a description of the tokens to be recognised in the form of regular expressions. It is similar to the tool lex or flex for C/C++...
Alex is part of the Haskell Platform, so if you install the platform you will automatically have a working Alex.
Alex is also on Hackage. If you have the cabal-install tool (which also comes with the Haskell Platform), then you can build and install the latest version of Alex with
cabal install alex
To find out what the latest version of Alex is, and to download the source separately, go to Alex's HackageDB page.
发布评论
评论(2)
亚历克斯? http://www.haskell.org/alex/
Alex? http://www.haskell.org/alex/
Happy : Yacc :: Alex : Lex
或者使用无数的解析器和词法分析器组合器库之一。
Happy : Yacc :: Alex : Lex
Or use one of a gazillion parser and lexer combinator libraries.