Scarlet Line home page Scarlet Line - SOFTWARE DESIGN & DEVELOPMENT

[Home]->[Documentation]->[Syntac Universal Parser]->[Other Grammars]->[Extended Backus-Naur form (EBNF)]->[Entry Points]->[syntac_file]

Expand All
Collapse All
Contents

ebnf::syntac_file Locate in Contents

Declaration Locate in Contents

syntac_file[parser_type & tree, bool was_included] ::=
    {
    size_t old_file = tree.add_file_path($file);
    std::string _result, _rules;
    if (!was_included)
        {
        tree.set_primary_symbol("");
        }
    }
        (lws? code_block[_result])? (lws? class_definition[tree])? lws? (production_rule[tree, _rules] | '%' body_declaration[tree]) (lwsnl (production_rule[tree, _rules] | '%' body_declaration[tree]))* lws? <<EOF>>
            {
            tree.add_precursor_code(_result.c_str());
            if (_M_ParseMode == PreprocessMode)
                {
                std::cout << '{' << _result << '}' << std::endl << _rules << std::endl;
                }
            tree.set_file_path(old_file);
            }

Composition Locate in Contents

syntac_file Concatenation Node Alternation Node Alternation Node Alternation Node Alternation Node Iteration Node Alternation Node EOF Concatenation Node @ Concatenation Node @ lws @ production_rule Concatenation Node Concatenation Node lws @ Alternation Node code_block Alternation Node class_definition '%' body_declaration lwsnl Alternation Node lws @ lws @ production_rule Concatenation Node '%' body_declaration

State Machine Locate in Contents

start:1:$0 lws|{735|$4|736} final:734:$0 code_block|{750|$5|751} lws|{735|$9|736} class_definition|{780|$10|781} lws|{735|$12|736} production_rule|{810|$14|811} body_declaration|{1003|$17|1004} lwsnl|{1020|$20|1021} production_rule|{810|$22|811} lws|{735|$27|736} body_declaration|{1003|$25|1004} lwsnl|{1020|$20|1021} EOF|{1024|$28|1025} production_rule|{810|$22|811} body_declaration|{1003|$25|1004}