1
0
Fork
You've already forked pyMetakitDefinitionString
0
A parser for metakit4 definition string
  • Python 100%
Find a file
KOLANICH 48c06065bc
Some checks reported warnings
CI / build (push) Has been cancelled
Initial commit
2023年10月13日 19:55:51 +03:00
.github Initial commit 2023年10月13日 19:55:51 +03:00
pyMetakitDefinitionString Initial commit 2023年10月13日 19:55:51 +03:00
.editorconfig Initial commit 2023年10月13日 19:55:51 +03:00
.gitignore Initial commit 2023年10月13日 19:55:51 +03:00
Code_Of_Conduct.md Initial commit 2023年10月13日 19:55:51 +03:00
MANIFEST.in Initial commit 2023年10月13日 19:55:51 +03:00
parserBundle Initial commit 2023年10月13日 19:55:51 +03:00
pyproject.toml Initial commit 2023年10月13日 19:55:51 +03:00
ReadMe.md Initial commit 2023年10月13日 19:55:51 +03:00
UNLICENSE Initial commit 2023年10月13日 19:55:51 +03:00

pyMetakitDefinitionString Unlicensed work

(削除) wheel (GHA via nightly.link) (削除ここまで) (削除) GitHub Actions (削除ここまで) Libraries.io Status Code style: antiflash

Parses metakit definition string.

Usage

import pyMetakitDefinitionString
d = pyMetakitDefinitionString.parse("people[first:S,last:S,shoesize:I],text[line:S]")
print(d)
[
	view<name='people', bodyF=[scalar<name='first', typeF='S'>, scalar<name='last', typeF='S'>, scalar<name='shoesize', typeF='I'>]>,
	view<name='text', bodyF=[scalar<name='line', typeF='S'>]>
]

Interpretation of typeF is up to you since adding a enum will not spare you from having a look-up table. See the docs.

Requirements

  • UniGrammarRuntime
  • Any of the backends for which parsers have been generated. parsimonious is recommended, as it was benchmarked as the fastest one.