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

Function mark_symbol

extern/btyacc/reader.c:1584–1621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1582}
1583
1584int mark_symbol()
1585{
1586 register int c;
1587 register bucket *bp;
1588
1589 c = cptr[1];
1590 if (c == '%' || c == '\\') {
1591 cptr += 2;
1592 return (1); }
1593
1594 if (c == '=')
1595 cptr += 2;
1596 else if ((c == 'p' || c == 'P') &&
1597 ((c = cptr[2]) == 'r' || c == 'R') &&
1598 ((c = cptr[3]) == 'e' || c == 'E') &&
1599 ((c = cptr[4]) == 'c' || c == 'C') &&
1600 ((c = cptr[5], !IS_IDENT(c))))
1601 cptr += 5;
1602 else
1603 syntax_error(lineno, line, cptr);
1604
1605 c = nextc();
1606 if (isalpha(c) || c == '_' || c == '.' || c == '$')
1607 bp = get_name();
1608 else if (c == '\'' || c == '"')
1609 bp = get_literal();
1610 else {
1611 syntax_error(lineno, line, cptr);
1612 /*NOTREACHED*/
1613 return 0;}
1614
1615 if (rprec[nrules] != UNDEFINED && bp->prec != rprec[nrules])
1616 prec_redeclared();
1617
1618 rprec[nrules] = bp->prec;
1619 rassoc[nrules] = bp->assoc;
1620 return (0);
1621}
1622
1623void read_grammar()
1624{

Callers 1

read_grammarFunction · 0.85

Calls 5

syntax_errorFunction · 0.85
nextcFunction · 0.85
get_nameFunction · 0.85
get_literalFunction · 0.85
prec_redeclaredFunction · 0.85

Tested by

no test coverage detected