Syntax diagram: Difference between revisions

Content deleted Content added
Line 43:
DIGIT = "0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9"
</syntaxhighlight>
Note that ABNF also supports ranges, e.g. {{code|2=abnf|1=DIGIT = %x30-39}}, but it is not used here for consistency with the other examples.
 
[[Red (programming language)]] Parse Dialect:
Line 55:
digit: ["0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"]
</syntaxhighlight>
Note that thisThis format also supports ranges, e.g. {{code|2=red|digit: charset [#"0" - #"9"]}}, but it is not used here for consistency with the other examples.
 
One possible syntax diagram for the example grammars is below. Note that whileWhile the syntax for the text-based grammars differs, the syntax diagram for all of them can be the same because it is a [[metalanguage]].
 
[[Image:Syntax-diagram-example.png|"Railroad" syntax diagram]]