]> git.armaanb.net Git - gen-shell.git/blob - src/libshared/src/lex.cpp
added install instructions
[gen-shell.git] / src / libshared / src / lex.cpp
1 ////////////////////////////////////////////////////////////////////////////////
2
3 #include <iostream>
4 #include <Lexer.h>
5
6 int main (int argc, char** argv)
7 {
8   for (auto i = 1; i < argc; i++)
9   {
10     std::cout << "argument '" << argv[i] << "'\n";
11
12     Lexer l (argv[i]);
13     std::string token;
14     Lexer::Type type;
15     while (l.token (token, type))
16       std::cout << "  token '" << token << "' " << Lexer::typeToString (type) << "\n";
17   }
18 }
19
20 ////////////////////////////////////////////////////////////////////////////////