"Parse and evaluate a simple expression.
The result is a pair (TYPE . VALUE). Currently, type types are `:id',
- `:int', `:string', and `:char'. If an error prevented a sane value from
+ `:int', `:string', `:char', `:fragment', `:type'. If an error prevented a sane value from
being produced, the type `:invalid' is returned.
The syntax of expressions is rather limited at the moment, but more may be
(sexp (read stream t)))
(scanner-step scanner)
(multiple-value-bind (type value)
- (decode-property sexp)
+ (restart-case (decode-property (eval sexp))
+ (continue () (values :invalid nil)))
(values (cons type value) t t))))
(#\{
(values (cons :fragment
(values (cons :type (car dc))
t t))))
(t
- (values (list :int :id :char :string #\?)
+ (values (list :int :id :char :string #\? #\{ #\<)
nil nil)))))
(or (seq (#\+) add)
(seq (#\-) sub)