diff --git a/spec.txt b/spec.txt index c2c787c..f1041d9 100644 --- a/spec.txt +++ b/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 <> -pages : pages page | <> -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 '>' | <> -maybe-skillchange: '(' op INT SKILL ') | <> - Work log: 12/13/21