updates on developer information (parsing with lark)

This commit is contained in:
Trilarion
2020-02-03 15:50:24 +01:00
parent 10625a854a
commit eeb20a670a
66 changed files with 354 additions and 104 deletions

15
code/grammar_entries.lark Normal file
View File

@ -0,0 +1,15 @@
start: title description property+ _E note _E? building
title: "# " /(?! ).+(?<! )/ "\n" _E // not starting or ending with a space
description: "_" /(?! ).+(?<![ _])/ "_\n" _E // single line not ending with underscore
property: "- " _key ": " _value "\n" // a property on a single line "- key: value"
_key: /(?! ).+?(?=:)/ // key: everything until next ":"
_value: /.+(?<! )/ // everything until the end of the line
building: "## Building\n" _E property+ _E? note // the "building" section
note: /(?![\-#]).*\n/* // Unstructured text, not starting with - or #
_E: /^$\n/m // empty new line (filtered from tree)