Talk:Metasyntax
This is the talk page for discussing improvements to the Metasyntax article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
This level-5 vital article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||||||||||||||
|
Merge "Metasyntax" stub into "Metalanguage" article?
editShould this stub be mergerd into the Metalanguage article, or does this precise topic warrant an article of its own?
Metacompiler metalanguage syntax
editMETA II and its descendants are different then BNF metalanguages. They are programming languages. What is called non terminals in BNF are rules in these languages. A rule is a boolean function returning success or failure. A syntax rule is a test as are strings and symbols. Tokens, symbols and strings, would be terminals. However in CWIC you have programmed token rules.
syntax = $(rule \ char_class \ token); id .. let $(let | dgt | '_'); string .. '"' $(~'"') '"' MAKESTR[]; rule = id "=" sequence ";" :RULE!2 gen_code[*1]; sequence = test_seq (("\" backtrack:BCK|"/":ALT alternant)!2|.EMPTY); backtrack = test_seq ("\" backtrack:BCK!2|.EMPTY); alternant = test_seq ( "/" alternant:ALT!2|.EMPTY); test_seq = "(" sequence ")" | <(test | action) $(test | action)>; test = string | rule_call; rule_call = id:CALL ("[" <arg_list> "]"!2 | !1); action = (":" id:NODE | "!" number:TREE | "<" sequence ">":LIST)!1;
A symbol or identifier is defined by a token '..' rule. Even let and dgt in the id token rule are defined by a character class rule. SYNTAX and TOKEN rules are boolean functions returning success or failure. Character class rule define tests that are used in other rules. Generally inline code.
dgt: '0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9';
These metasyntax metalanguages do not fit the description in artical. Steamerandy (talk) 21:42, 13 December 2014 (UTC)