File: standard.cc

package info (click to toggle)
bisonc%2B%2B 4.09.02-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,412 kB
  • ctags: 2,871
  • sloc: cpp: 9,459; ansic: 1,434; makefile: 1,091; sh: 286; yacc: 84; lex: 60
file content (21 lines) | stat: -rw-r--r-- 400 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "production.ih"

std::ostream &Production::standard(std::ostream &out) const
{
    out << d_nr << ": " << lhs();

    if (d_precedence != 0)
        out << " (" << d_precedence << ')';

    out << " -> ";

    if (size() == 0)
        out <<  " <empty>";
    else
    {
        for (const_iterator sym = begin(); sym != end(); ++sym)
            out << ' ' << *sym;
    }

    return out;
}