Talk:Metasyntax

Should this stub be mergerd into the Metalanguage article, or does this precise topic warrant an article of its own?

Talk:Metasyntax

Merge "Metasyntax" stub into "Metalanguage" article?

Should this stub be mergerd into the Metalanguage article, or does this precise topic warrant an article of its own?

Stephan Leeds (talk) 13:13, 26 May 2008 (UTC)Reply

Metacompiler metalanguage syntax

META 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)Reply

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.