aboutsummaryrefslogtreecommitdiff
path: root/syntax/Uri.py
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-05-26 11:00:33 +0200
committerJonas Smedegaard <dr@jones.dk>2025-05-26 11:40:24 +0200
commitb39149eae9a046dea7367ea0423fb7e7a27149a2 (patch)
tree89ffea26c8c359086b59b4f81a5158641411b652 /syntax/Uri.py
parentbd8c87a53621a3e1e421c22caf30571a90db398c (diff)
rename syntax definitions: drop prefix def_
Diffstat (limited to 'syntax/Uri.py')
-rwxr-xr-xsyntax/Uri.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/syntax/Uri.py b/syntax/Uri.py
new file mode 100755
index 0000000..028c3e1
--- /dev/null
+++ b/syntax/Uri.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(
+ "<",
+ NonTerminal("![<>] PRINTABLES"),
+ ">",
+ ),
+ NonTerminal("![<>] PRINTABLES"),
+ ),
+ type="complex"
+).writeStandalone(sys.stdout.write)