X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/048d0b2d143b6a491ac73eed6ab972e97774391c..3f725f73b9ae26a54f49b5feb744d37a8f1dd308:/src/pset-parse.lisp diff --git a/src/pset-parse.lisp b/src/pset-parse.lisp index ff59551..11b4003 100644 --- a/src/pset-parse.lisp +++ b/src/pset-parse.lisp @@ -82,7 +82,8 @@ expression: term | expression `+' term | expression `-' term term: factor | term `*' factor | term `/' factor factor: primary | `+' factor | `-' factor - primary: int | id | string | `(' expression `)' | `?' lisp-expression + primary: int | id | string | `(' expression `)' | `{' fragment `}' + | `?' lisp-expression Only operators for dealing with integers are provided." (with-parser-context (token-scanner-context :scanner scanner) @@ -98,8 +99,14 @@ (let* ((stream (make-scanner-stream scanner)) (sexp (read stream t))) (scanner-step scanner) - (values (cons (property-type sexp) sexp) - t t))) + (multiple-value-bind (type value) + (decode-property sexp) + (values (cons type value) t t)))) + (#\{ + (values (cons :fragment + (parse-delimited-fragment scanner + #\{ #\})) + t t)) (t (values (list :int :id :char :string #\?) nil nil)))))