From 1ff13908635aecd00d5d5b9f30aa1041bd122856 Mon Sep 17 00:00:00 2001 From: Devin Weaver Date: Sun, 21 Jun 2015 14:30:21 -0400 Subject: [PATCH] Add a syntax specification to MultiTiddlerFiles Been playing with the railraod plugin and I thought I'd try my hand at writing some syntax specs for the MultiTiddlerFiles tiddler. --- .../fileformats/MultiTiddlerFileSyntax.tid | 29 +++++++++++++++++++ .../fileformats/MultiTiddlerFiles.tid | 6 +++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 editions/tw5.com/tiddlers/fileformats/MultiTiddlerFileSyntax.tid diff --git a/editions/tw5.com/tiddlers/fileformats/MultiTiddlerFileSyntax.tid b/editions/tw5.com/tiddlers/fileformats/MultiTiddlerFileSyntax.tid new file mode 100644 index 000000000..0244b78c3 --- /dev/null +++ b/editions/tw5.com/tiddlers/fileformats/MultiTiddlerFileSyntax.tid @@ -0,0 +1,29 @@ +created: 20150621181334837 +modified: 20150621181400844 +tags: [[TiddlyWiki on Node.js]] +title: MultiTiddlerFileSyntax +type: text/vnd.tiddlywiki + +!!! MultiTiddlerFiles + +<$railroad text=""" +{<"Header Line">} "Blank Line" {(<"Tiddler Descriptor Line"> | <"Comment Line">)} +"""/> + +!!! Header Line + +<$railroad text=""" +<"Identifier"> ":" {"Whitespace"} <"Value"> "New Line" +"""/> + +!!! Tiddler Descriptor Line + +<$railroad text=""" +<"File Path"> ":" {"Whitespace"} <"Tiddler Title"> "New Line" +"""/> + +!!! Comment Line + +<$railroad text=""" +"#" {("Text" | "Whitespace")} "New Line" +"""/> diff --git a/editions/tw5.com/tiddlers/fileformats/MultiTiddlerFiles.tid b/editions/tw5.com/tiddlers/fileformats/MultiTiddlerFiles.tid index ccd9ff757..db9ddcdaf 100644 --- a/editions/tw5.com/tiddlers/fileformats/MultiTiddlerFiles.tid +++ b/editions/tw5.com/tiddlers/fileformats/MultiTiddlerFiles.tid @@ -1,5 +1,5 @@ created: 20140209143652456 -modified: 20140912141738408 +modified: 20150621182140407 tags: [[TiddlyWiki on Node.js]] title: MultiTiddlerFiles type: text/vnd.tiddlywiki @@ -30,3 +30,7 @@ Basics/Version: ~TiddlyWiki Version This example defines two tiddlers, [[$:/language/ControlPanel/Basics/Caption]] and [[$:/language/ControlPanel/Basics/Version]]. If a `title` field is specified in the header then it is treated as a prefix for the individual tiddlers defined in the title. + +!! Syntax Specification + +{{MultiTiddlerFileSyntax}}