diff options
| author | Jonas Smedegaard <dr@jones.dk> | 2025-05-26 11:00:33 +0200 |
|---|---|---|
| committer | Jonas Smedegaard <dr@jones.dk> | 2025-05-26 11:40:24 +0200 |
| commit | b39149eae9a046dea7367ea0423fb7e7a27149a2 (patch) | |
| tree | 89ffea26c8c359086b59b4f81a5158641411b652 /syntax/PlainWords.py | |
| parent | bd8c87a53621a3e1e421c22caf30571a90db398c (diff) | |
rename syntax definitions: drop prefix def_
Diffstat (limited to 'syntax/PlainWords.py')
| -rwxr-xr-x | syntax/PlainWords.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/syntax/PlainWords.py b/syntax/PlainWords.py new file mode 100755 index 0000000..4af2d12 --- /dev/null +++ b/syntax/PlainWords.py @@ -0,0 +1,20 @@ +#!/usr/bin/python3 + +# Copyright 2025, Jonas Smedegaard <dr@jones.dk> +# SPDX-License-Identifier: GPL-3+ + +from railroad import * + +Diagram( + NonTerminal("PRINTABLES"), + Choice(0, + OneOrMore( + Sequence( + NonTerminal("_"), + NonTerminal("PRINTABLES") + ) + ), + Skip() + ), + type="complex" +).writeStandalone(sys.stdout.write) |
