[mod] readme

This commit is contained in:
fenris 2025-09-23 21:46:56 +02:00
parent d2395d897e
commit 52b2aee6ea

View file

@ -54,25 +54,13 @@ record<
where:
- `version` should be `"2"`
- `parser_start` is one of the parser rule `label` values.
- `lexer_rules.*.type` is one of `ignore`, `void`, `boolean`, `int`, `float`, `string` (see section _Lexer rule types_)
- `lexer_rules.*.pass` controls, whether the read sequence shall be incorporated or not
- `parser_rules.*.conclusion.*.type` is one of `terminal`, `variable` (see section _Conclusion element types_)
- `parser_start` is one of the parser rule `label` values
The recommended extension for such files is `.tp2.json`.
### Lexer rule types
| type | meaning | parameters |
|-- |-- |-- |
| `ignore` | disregard matching strings | `pattern` |
| `void` | do not assign a value to matching strings | `pattern`, `id` |
| `boolean` | interpret matching strings as boolean values | `pattern`, `id`, `value` |
| `int` | interpret matching strings as integer number values | `pattern`, `id` |
| `float` | interpret matching strings as floating point number values | `pattern`, `id` |
| `string` | interpret matching strings as string values | `pattern`, `id` |
### Conclusion element types
| type | meaning | parameters |