[Haskell-beginners] SQL Lexer
keithshep at gmail.com
Sat May 9 08:56:56 EDT 2009
This may be a better approach then my code. I didn't create a separate
On Fri, May 8, 2009 at 9:53 PM, Patrick LeBoutillier
<patrick.leboutillier at gmail.com> wrote:
> Hi all,
> In the process of writing an SQL parser I started by writing a lexer.
> The code can be found here:
> You can run it like this in ghci:
> Prelude SQL.Lexer> runLexer "select * from TABLE order by FIELD"
> [Token Reserved "select",Token Space " ",Token Operator "*",Token
> Space " ",Token Reserved "from",Token Space " ",Token Identifier
> "TABLE",Token Space " ",Token Reserved "order",Token Space " ",Token
> Reserved "by",Token Space " ",Token Identifier "FIELD"]
> Since this is pretty much my first Haskell project over 10 lines long,
> I'm looking for some feedback of any kind.
> Ultimately I would like to use this lexer to build a functional SQL
> parser using Parsec.
> Patrick LeBoutillier
> Rosemère, Québec, Canada
> Beginners mailing list
> Beginners at haskell.org
More information about the Beginners