diff options
author | Asbjørn Sloth Tønnesen <ast@2e8.dk> | 2020-02-17 19:49:05 +0000 |
---|---|---|
committer | Asbjørn Sloth Tønnesen <ast@2e8.dk> | 2020-02-17 20:29:00 +0000 |
commit | 87ae0d70b2bc1c5aa4078602a343f2c2d3db3feb (patch) | |
tree | 63f4e5f32f556376b0794d2ce7f8185b86063516 /test/readme.lua | |
parent | 915121994184739af16b03b5b50212adda503a19 (diff) | |
download | lua-inet-87ae0d70b2bc1c5aa4078602a343f2c2d3db3feb.tar.gz lua-inet-87ae0d70b2bc1c5aa4078602a343f2c2d3db3feb.tar.xz lua-inet-87ae0d70b2bc1c5aa4078602a343f2c2d3db3feb.zip |
extend README
Signed-off-by: Asbjørn Sloth Tønnesen <ast@2e8.dk>
Diffstat (limited to 'test/readme.lua')
-rw-r--r-- | test/readme.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/readme.lua b/test/readme.lua index dd39dac..ead30dc 100644 --- a/test/readme.lua +++ b/test/readme.lua @@ -36,9 +36,12 @@ do local assignment = Ct(Cc('assignment') * assign_left * assign_mid * assign_right) local comment = P('--') * rest_of_line local indented_line = sp^2 * (comment + example + assignment) * sp^0 + local section = P('=')^1 + local install_hdr = P('Install') * nl * section * nl + local install_section = install_hdr * ((rest_of_line * nl) - section)^1 * section local anyline = rest_of_line - (sp * rest_of_line) local non_match = Ct(Cc('unable to parse line') * C(rest_of_line)) - local line = indented_line + anyline + non_match + local line = indented_line + install_section + anyline + non_match readme_parser = Ct((line * nl)^0 * line^-1 * -1) end |