Thanks, I was mildly disappointed that I couldn't use that regexp
feature in lex-abbrevs.
I did end up using the arbitrary code feature in the "lexer" actions to
great effect: to scan a string literal token that requires paren
balancing, and do to the unescaping in the same pass. The "lexer"
On Mon, Mar 5, 2012 at 4:57 PM, Neil Van Dyke wrote:
> In a "define-lex-abbrev", how do I match an EOF?
According to the documentation for that library, eof is a special
case. It's not a regular expression, and is a peer of the other
triggers (special, special-comment) for a rule. It's meant to
In a "define-lex-abbrev", how do I match an EOF?
For example:
BEGIN
#lang racket/base
(require parser-tools/lex
parser-tools/lex-sre)
(define-lex-abbrev my-newline-or-eof-abbrev
(: (? #\return)
(or #\newline #;eos)))
;; TODO: Need to match EOF where "#;eos" is above.
3 matches
Mail list logo