aboutsummaryrefslogtreecommitdiff
path: root/syntax/KeyWord.py
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-05-26 13:02:00 +0200
committerJonas Smedegaard <dr@jones.dk>2025-05-26 13:02:00 +0200
commita3eb7e16a727849c58cbabe3b1b9ef64b6f740f6 (patch)
treeb173b77fcbd7355d409df8a9cfc1362518569c75 /syntax/KeyWord.py
parentcc6f0bb498635e85fa7938d34051af1e6ec0df37 (diff)
restructure PEG for simpler adding SemWord
Diffstat (limited to 'syntax/KeyWord.py')
-rwxr-xr-xsyntax/KeyWord.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/syntax/KeyWord.py b/syntax/KeyWord.py
new file mode 100755
index 0000000..4c4ef45
--- /dev/null
+++ b/syntax/KeyWord.py
@@ -0,0 +1,16 @@
+#!/usr/bin/python3
+
+# Copyright 2025, Jonas Smedegaard <dr@jones.dk>
+# SPDX-License-Identifier: GPL-3+
+
+from railroad import *
+
+Diagram(
+ Choice(0,
+ NonTerminal("Identifier"),
+ NonTerminal("Class"),
+ NonTerminal("Attribute"),
+ "-"
+ ),
+ type="complex"
+).writeStandalone(sys.stdout.write)