yo/concrete/lexer/lexer.cc
raw| 1 | #include "lexer.ih" |
| 2 | |
| 3 | int main(int argc, char **argv) |
| 4 | try |
| 5 | { |
| 6 | if (argc == 1) |
| 7 | { |
| 8 | cerr << "Filename argument required\n"; |
| 9 | return 1; |
| 10 | } |
| 11 | |
| 12 | Scanner scanner(argv[1], "-"); |
| 13 | |
| 14 | scanner.setDebug(argc > 2); |
| 15 | |
| 16 | return scanner.lex(); |
| 17 | } |
| 18 | catch (exception const &exc) |
| 19 | { |
| 20 | cerr << exc.what() << '\n'; |
| 21 | return 1; |
| 22 | } |