diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-12-14 17:49:36 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-12-14 17:49:46 -0800 |
| commit | 6ba84a0f507270fba8e7a68901dc256c2979d7f9 (patch) | |
| tree | 8f342ace5a015cf14df12bb17525f02de89bf47d /nomsu.4.peg | |
| parent | 0d88091f8d6cba8c552e2d3ffd3551819f8a4aed (diff) | |
Initial setup work for syntax version 5.
Diffstat (limited to 'nomsu.4.peg')
| -rw-r--r-- | nomsu.4.peg | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/nomsu.4.peg b/nomsu.4.peg index 95e3ef0..5f84688 100644 --- a/nomsu.4.peg +++ b/nomsu.4.peg @@ -111,18 +111,24 @@ indented_nomsu (EscapedNomsu): index_chain (IndexChain): noindex_inline_expression ("." (text_word / noindex_inline_expression))+ +inline_action: inline_methodcall / _inline_action +inline_methodcall (MethodCall): + (inline_expression / "(" inline_block ")") ws* "::" ws* _inline_action -- Actions need either at least 1 word, or at least 2 tokens -inline_action (Action): +_inline_action (Action): !section_division - ({:target: (inline_expression / "(" inline_block ")") :} ws* "::" ws*)? ( (inline_arg (ws* (inline_arg / word))+) / (word (ws* (inline_arg / word))*)) (ws* inline_block)? inline_arg: inline_expression / inline_block / "(" ws* ")" -action (Action): + +action: methodcall / _action +methodcall (MethodCall): + (expression / "(" inline_block ")" / indented_block) + ((ws* "\")? eol nl_nodent "..")? ws* "::" ((ws* "\")? eol nl_nodent "..")? ws* + _action +_action (Action): !section_division - ({:target: (expression / "(" inline_block ")" / indented_block) :} - ((ws* "\")? eol nl_nodent "..")? ws* "::" ((ws* "\")? eol nl_nodent "..")? ws*)? ( (arg (((ws* "\")? eol nl_nodent "..")? ws* (arg / word))+) / (word (((ws* "\")? eol nl_nodent "..")? ws* (arg / word))*)) arg: expression / inline_block / indented_block / "(" ws* ")" |
