aboutsummaryrefslogtreecommitdiff
path: root/syntax/Attribute.py
diff options
context:
space:
mode:
Diffstat (limited to 'syntax/Attribute.py')
-rwxr-xr-xsyntax/Attribute.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/syntax/Attribute.py b/syntax/Attribute.py
new file mode 100755
index 0000000..c899252
--- /dev/null
+++ b/syntax/Attribute.py
@@ -0,0 +1,23 @@
+#!/usr/bin/python3
+
+# Copyright 2025, Jonas Smedegaard <dr@jones.dk>
+# SPDX-License-Identifier: GPL-3+
+
+from railroad import *
+
+Diagram(
+ "[[:alpha:]]",
+ "[[:alnum:]]*",
+ NonTerminal("_?"),
+ "=",
+ NonTerminal("_?"),
+ Choice(0,
+ Sequence(
+ '"',
+ "[[:alnum:]]*",
+ '"',
+ ),
+ "[[:alnum:]]*"
+ ),
+ type="complex"
+).writeStandalone(sys.stdout.write)