The following file should fail to compile because foo should be unbound. However, foo is bound, to some value internal to the parser:
#lang racket
(require parser-tools/lex parser-tools/cfg-parser)
(define-empty-tokens my-tokens (eof BLAH))
(define x
(cfg-parser
(start foo)
(tokens my-tokens)
(end eof)
(grammar
(foo ((BLAH)
;; this should be unbound but it isn't.
foo)))))
For an example of how this might be harmful, consider:
The following file should fail to compile because
foo
should be unbound. However,foo
is bound, to some value internal to the parser:For an example of how this might be harmful, consider: