diff options
Diffstat (limited to 'syntax/StyledWords.py')
| -rwxr-xr-x | syntax/StyledWords.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/syntax/StyledWords.py b/syntax/StyledWords.py new file mode 100755 index 0000000..c387c1a --- /dev/null +++ b/syntax/StyledWords.py @@ -0,0 +1,27 @@ +#!/usr/bin/python3 + +# Copyright 2025, Jonas Smedegaard <dr@jones.dk> +# SPDX-License-Identifier: GPL-3+ + +from railroad import * + +Diagram( + Choice(0, + Sequence( + "**", + NonTerminal("Words"), + "**" + ), + Sequence( + "*", + NonTerminal("Words"), + "*" + ), + Sequence( + "_", + NonTerminal("Words"), + "_" + ) + ), + type="complex" +).writeStandalone(sys.stdout.write) |
