improve txtadv parser with hiding & splicing
This commit is contained in:
parent
e435574b9f
commit
975d0da0f5
|
@ -58,11 +58,6 @@
|
||||||
(define #'(places-section (_place-id _place-desc [_place-item ...] [_actionname _actiondesc] ...) ...)
|
(define #'(places-section (_place-id _place-desc [_place-item ...] [_actionname _actiondesc] ...) ...)
|
||||||
#'(begin (define-place _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.
|
;; todo: consolidate the game-starters.
|
||||||
;; `start-game-at` works with s-exp language,
|
;; `start-game-at` works with s-exp language,
|
||||||
|
|
|
@ -20,10 +20,16 @@ places-section : !"===PLACES===" place-item+
|
||||||
|
|
||||||
!place-item : DASHED-NAME STRING place-items id-desc+
|
!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
|
start-section : !"===START===" ID
|
||||||
|
|
||||||
!id-desc : ID s-exp
|
!id-desc : ID s-exp
|
||||||
|
|
||||||
s-exp : ID | STRING | !"(" s-exp* !")"
|
@s-exp : ID | STRING | nested-s-exp
|
||||||
|
|
||||||
|
!nested-s-exp : !"(" s-exp* !")"
|
|
@ -20,7 +20,6 @@
|
||||||
"get key"
|
"get key"
|
||||||
"You now have the key.\n")
|
"You now have the key.\n")
|
||||||
|
|
||||||
|
|
||||||
(check-cmd?
|
(check-cmd?
|
||||||
"n"
|
"n"
|
||||||
"You're standing in a meadow. There is a house to the north.\n")
|
"You're standing in a meadow. There is a house to the north.\n")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user