Professional Documents
Culture Documents
The Scribble Reader: An Alternative To S-Expressions For Textual Content
The Scribble Reader: An Alternative To S-Expressions For Textual Content
Eli Barzilay
Northeastern University
eli@barzilay.org
The way that this is addressed in Scribble is by introducing another 7 This is similar to one reason that identifiers are not allowed to begin with
part to @-forms where additional “Scheme-mode” arguments can a @ in standard Scheme, as it makes ,@foo ambiguous.
appear. This part is specified using square bracket delimiters.
A related problem occurs when we try to unquote @-forms: if we A line comment starts with a @; (and followed by a character other
follow the rules, we need ‘@{...@, @f{}...} — but Schemers than ;), and it ends at the first non-whitespace character in the
want their unquotes short and convenient (e.g., reader shorthands). following line. This kind of comment can be useful in the same
Scribble solves both problems by “pulling out” any of the short- way as LATEXcomments.
hand punctuations (’ ‘ , ,@ #’ #‘ #, #,@) outside of an @-form’s > @list{Some text, @; a comment
head when they are found there, and wraps them around the whole more text.}
expression. This solves both problems conveniently: ("Some text, more text.")
> ‘(html @,string-titlecase{hello world!}) There is no syntax for an “expression comment”, because defining
(html "Hello World!")
> ‘@html{... @,string-titlecase{hello world!} ...} an “expression” in a textual context is more difficult, and also
(html "... " "Hello World!" " ...") because we had no need for this so far.