Project info for dso-lex

Share This Created 7 Feb 2008 at 01:58 UTC by dsowen, last modified 7 Feb 2008 at 02:02 UTC by dsowen.



Allows lexers to be defined using regular expressions a la cl-ppcre. A lexer will convert (or tokenize) a text string into a list of tokens (consisting of a token-class and the token's image). For example:

(defun snip (s) (subseq s 1 (1- (length s))))

(defun un-squote (s) (regex-replace-all "''" (snip s) "'"))
(defun un-dquote (s) (regex-replace-all "\"\"" (snip s) "\""))

(deflexer scan-csv
  ("[^\"',]+" value)
  ("'(?:[^']|'')*'" value un-squote)
  ("\"(?:[^\"]|\"\")*\"" value un-dquote)
  ("," comma))
See the distribution for a more complete example.

License: LGPL

This project has the following developers:

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

Share this page