Debian Codegraph @

documentation/manual/error/errordemo/parser/lex.cc

raw
1 #include "parser.ih"
2
3 int Parser::lex()
4 {
5 std::string word;
6
7 std::cin >> word;
8 if (std::cin.eof())
9 return 0;
10 if (isdigit(word[0]))
11 return NR;
12
13 return word[0];
14 }