Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Metasyntactic variable
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===IETF Requests for Comments=== Both the [[IETF]] [[Request for Comments|RFC]]s and [[computer programming language]]s are rendered in [[plain text]], making it necessary to distinguish metasyntactic variables by a naming convention, since it would not be obvious from context. Here is an example from the official [[IETF]] document explaining the [[e-mail]] protocols (from RFC 772 - cited in RFC 3092): All is well; now the recipients can be specified. S: MRCP TO:<Foo@Y> <CRLF> R: 200 OK S: MRCP TO:<Raboof@Y> <CRLF> R: 553 No such user here S: MRCP TO:<bar@Y> <CRLF> R: 200 OK S: MRCP TO:<@Y,@X,fubar@Z> <CRLF> R: 200 OK Note that the failure of "Raboof" has no effect on the storage of mail for "Foo", "bar" or the mail to be forwarded to "fubar@Z" through host "X". (The documentation for texinfo emphasizes the distinction between metavariables and mere variables used in a programming language being documented in some texinfo file as: "Use the @var command to indicate metasyntactic variables. A metasyntactic variable is something that stands for another piece of text. For example, you should use a metasyntactic variable in the documentation of a function to describe the arguments that are passed to that function. Do not use @var for the names of particular [[Variable (programming)|variables]] in programming languages. These are specific names from a program, so @code is correct for them."<ref>{{cite web |url=http://sunsite.ualberta.ca/Documentation/Gnu/texinfo-4.0/html_chapter/texinfo_10.html |title=Marking Words and Phrases |work=Texinfo 4.0. The GNU Documentation Format|access-date=2012-11-25 |url-status=dead |archive-url=https://web.archive.org/web/20091106004856/http://sunsite.ualberta.ca/Documentation/Gnu/texinfo-4.0/html_chapter/texinfo_10.html |archive-date=2009-11-06 }}</ref>) Another point reflected in the above example is the convention that a metavariable is to be uniformly substituted with the same instance in all its appearances in a given schema. This is in contrast with [[nonterminal]] symbols in [[formal grammars]] where the nonterminals on the right of a production can be substituted by different instances.<ref name="Tennent2002">{{cite book|author=R. D. Tennent|title=Specifying Software: A Hands-On Introduction|year=2002|publisher=Cambridge University Press|isbn=978-0-521-00401-5|pages=36β37 and 210}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)