diff --git a/beautiful-racket/br/demo/txtadv/expander.rkt b/beautiful-racket/br/demo/txtadv/expander.rkt index 6c714ab..a844056 100644 --- a/beautiful-racket/br/demo/txtadv/expander.rkt +++ b/beautiful-racket/br/demo/txtadv/expander.rkt @@ -58,11 +58,6 @@ (define #'(places-section (_place-id _place-desc [_place-item ...] [_actionname _actiondesc] ...) ...) #'(begin (define-place _place-id _place-desc [_place-item ...] ([_actionname _actiondesc] ...)) ...)) -(provide s-exp) -(define-cases-inverting #'s-exp - [#'(_ _sx) #'_sx] - [#'(_ _sx ... ) #'(_sx ...)]) - ;; todo: consolidate the game-starters. ;; `start-game-at` works with s-exp language, diff --git a/beautiful-racket/br/demo/txtadv/parser.rkt b/beautiful-racket/br/demo/txtadv/parser.rkt index 523d778..a0d41e1 100644 --- a/beautiful-racket/br/demo/txtadv/parser.rkt +++ b/beautiful-racket/br/demo/txtadv/parser.rkt @@ -20,10 +20,16 @@ places-section : !"===PLACES===" place-item+ !place-item : DASHED-NAME STRING place-items id-desc+ -!place-items : !"[" ([!","] ID)* !"]" +!place-items : !"[" [place next-place*] !"]" + +@place : ID + +@next-place: !"," place start-section : !"===START===" ID !id-desc : ID s-exp -s-exp : ID | STRING | !"(" s-exp* !")" \ No newline at end of file +@s-exp : ID | STRING | nested-s-exp + +!nested-s-exp : !"(" s-exp* !")" \ No newline at end of file diff --git a/beautiful-racket/br/demo/txtadv/world-test.rkt b/beautiful-racket/br/demo/txtadv/world-test.rkt index 80a4b04..82a94d7 100644 --- a/beautiful-racket/br/demo/txtadv/world-test.rkt +++ b/beautiful-racket/br/demo/txtadv/world-test.rkt @@ -20,7 +20,6 @@ "get key" "You now have the key.\n") - (check-cmd? "n" "You're standing in a meadow. There is a house to the north.\n")