Update PEG
This commit is contained in:
parent
369f90a68d
commit
34f2436999
18
spec.txt
18
spec.txt
@ -17,9 +17,11 @@ Requirements:
|
||||
3. Both story-writing and story-interaction tools need to be cross platform and relatively straightforwards for
|
||||
a non technical user to operate.
|
||||
|
||||
Story language PEG: (with apologies, this is my first PEG)
|
||||
Story language PEG:
|
||||
|
||||
Story <- BlankLine* Page+ EndOfFile
|
||||
Story <- BlankLine* Title Attribution Page+ EndOfFile
|
||||
Title <- (!Attribution .)+
|
||||
Attribution <- (!Newline .)+ Newline
|
||||
Page <- Header Body BlankLine*
|
||||
Header <- Identifier Newline BlankLine*
|
||||
Identifier <- [A-Z][A-Z0-9_]*
|
||||
@ -38,18 +40,6 @@ BlankLine <- Spacing Newline
|
||||
Spacing <- (' ' / '\t')*
|
||||
Newline <- '\r\n' / '\r' / '\n'
|
||||
|
||||
Story language CFG:
|
||||
|
||||
story : pages <<EOF>>
|
||||
pages : pages page | <<EPSILON>>
|
||||
page : ID FREETEXT footer
|
||||
footer : "THE END" | "GOTO" ID | choices
|
||||
choices : choices choice | choice
|
||||
choice : INT ')' FREETEXT maybe-skillcheck redirect maybe-skillchange
|
||||
redirect : '[' ID ']'
|
||||
maybe-skillcheck : '<' SKILL INT op '>' | <<EPSILON>>
|
||||
maybe-skillchange: '(' op INT SKILL ') | <<EPSILON>>
|
||||
|
||||
Work log:
|
||||
|
||||
12/13/21
|
||||
|
Loading…
Reference in New Issue
Block a user