diff --git a/src/notation.md b/src/notation.md index f9428efab..de262423c 100644 --- a/src/notation.md +++ b/src/notation.md @@ -40,11 +40,11 @@ When such a string in `monospace` font occurs inside the grammar, it is an implicit reference to a single member of such a string table production. See [tokens] for more information. -## Railroad visualizations +## Grammar visualizations -Below each grammar block is a button to toggle the display of a [railroad diagram]. A square element is a non-terminal rule, and a rounded rectangle is a terminal. +Below each grammar block is a button to toggle the display of a [syntax diagram]. A square element is a non-terminal rule, and a rounded rectangle is a terminal. -[railroad diagram]: https://en.wikipedia.org/wiki/Syntax_diagram +[syntax diagram]: https://en.wikipedia.org/wiki/Syntax_diagram ## Common productions diff --git a/theme/reference.css b/theme/reference.css index bb6d35bdb..31fb6473d 100644 --- a/theme/reference.css +++ b/theme/reference.css @@ -627,7 +627,7 @@ main > .rule { /* The toggle button. */ .grammar-toggle-railroad { - width: 120px; + width: 160px; padding: 5px 0px; border-radius: 5px; cursor: pointer; diff --git a/theme/reference.js b/theme/reference.js index 5fe3a98bf..599b66229 100644 --- a/theme/reference.js +++ b/theme/reference.js @@ -66,9 +66,9 @@ function update_railroad() { const buttons = document.querySelectorAll('.grammar-toggle-railroad'); buttons.forEach(button => { if (grammarRailroad) { - button.innerText = "Hide Railroad"; + button.innerText = "Hide syntax diagram"; } else { - button.innerText = "Show Railroad"; + button.innerText = "Show syntax diagram"; } }); }