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