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