MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / read_grammar

Function read_grammar

extern/btyacc/reader.c:1623–1649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1621}
1622
1623void read_grammar()
1624{
1625 register int c;
1626
1627 initialize_grammar();
1628 advance_to_start();
1629
1630 for (;;) {
1631 c = nextc();
1632 if (c == EOF) break;
1633 if (isalpha(c) || c == '_' || c == '.' || c == '$' || c == '\'' ||
1634 c == '"')
1635 add_symbol();
1636 else if (c == '{' || c == '=' || c == '[')
1637 copy_action();
1638 else if (c == '|') {
1639 end_rule();
1640 start_rule(plhs[nrules-1], 0);
1641 ++cptr; }
1642 else if (c == '%') {
1643 if (mark_symbol()) break; }
1644 else
1645 syntax_error(lineno, line, cptr); }
1646 end_rule();
1647 if (goal->args > 0)
1648 error(0, 0, 0, "start symbol %s requires arguments", goal->name);
1649}
1650
1651void free_tags()
1652{

Callers 1

readerFunction · 0.85

Calls 10

initialize_grammarFunction · 0.85
advance_to_startFunction · 0.85
nextcFunction · 0.85
add_symbolFunction · 0.85
copy_actionFunction · 0.85
end_ruleFunction · 0.85
start_ruleFunction · 0.85
mark_symbolFunction · 0.85
syntax_errorFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected