[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Denemo-devel] embedded scheme in lilypond parser
From: |
Richard Shann |
Subject: |
[Denemo-devel] embedded scheme in lilypond parser |
Date: |
Fri, 10 Sep 2010 19:49:40 +0100 |
Next step in Denemo's new lilypond parser is embedded scheme:
We need to be careful not to perturb the lexer when swallowing the
scheme with scheme's read proc. Soft port is the way to go I think:
(define myport (make-soft-port ... lexer-getc ...
Then (read port) will get embedded scheme from the lilypond input being
lexed.
make-soft-port takes:
1. procedure accepting one character for output #f
2. procedure accepting a string for output --> lexer-ungetc (??? or
do we need to take a string and call lexer-ungetc with a char?)
3. thunk for flushing output #f
4. thunk for getting one character --> lexer-getc
5. thunk for closing port (not by garbage collection) --> #f
6. (if present and not #f) thunk for computing the number of
characters that can be read from the port without blocking.
--> #f
7.
This should work...
Richard
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Denemo-devel] embedded scheme in lilypond parser,
Richard Shann <=