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/SemWords.py | |
| parent | bd8c87a53621a3e1e421c22caf30571a90db398c (diff) | |
rename syntax definitions: drop prefix def_
Diffstat (limited to 'syntax/SemWords.py')
| -rwxr-xr-x | syntax/SemWords.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/syntax/SemWords.py b/syntax/SemWords.py new file mode 100755 index 0000000..83867ef --- /dev/null +++ b/syntax/SemWords.py @@ -0,0 +1,22 @@ +#!/usr/bin/python3 + +# Copyright 2025, Jonas Smedegaard <dr@jones.dk> +# SPDX-License-Identifier: GPL-3+ + +from railroad import * + +Diagram( + Group(Sequence( + NonTerminal("SemWord"), + Choice(0, + OneOrMore( + Sequence( + NonTerminal("_"), + NonTerminal("SemWord") + ) + ), + Skip() + ) + )), + type="complex" +).writeStandalone(sys.stdout.write) |
