diff options
| -rw-r--r-- | _markdown.qmd | 6 | ||||
| -rw-r--r-- | _syntax.qmd | 2 | ||||
| -rwxr-xr-x | syntax/def_Curie.py | 18 |
3 files changed, 23 insertions, 3 deletions
diff --git a/_markdown.qmd b/_markdown.qmd index d1aa5dd..d038cc8 100644 --- a/_markdown.qmd +++ b/_markdown.qmd @@ -240,17 +240,17 @@ to denote whether it is an RDF subject, predicate or object. (Again, these RDF terms are described further in @sec-rdf). See @fig-def-additions for their syntax diagrams. -*FIXME: mention and draw `Curie`* - ::: {#fig-def-additions}   + +  -Syntax of `SemWords`, `SemWord`, `Curie`, `SEMPREFIX`. +Syntax of `SemWords`, `SemWord`, `Curie` and `SEMPREFIX`. ::: diff --git a/_syntax.qmd b/_syntax.qmd index d8af814..0dd6204 100644 --- a/_syntax.qmd +++ b/_syntax.qmd @@ -34,6 +34,8 @@ regular expressions and the negative predicate from PEG notation.  + +   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) |
