- Renamed Lexer2 to Lexer, it looks good enough to assume control.
This commit is contained in:
Paul Beckingham 2015-02-22 17:46:22 -05:00
parent e1c0d5b130
commit 745aad0d27
15 changed files with 553 additions and 553 deletions

View file

@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <Lexer2.h>
#include <Lexer.h>
#include <Context.h>
Context context;
@ -12,17 +12,17 @@ int main (int argc, char** argv)
{
std::cout << "input '" << argv[i] << "'\n";
// Low-level tokens.
Lexer2 lexer (argv[i]);
Lexer lexer (argv[i]);
std::string token;
Lexer2::Type type;
Lexer::Type type;
while (lexer.token (token, type))
std::cout << " token '" << token << "' " << Lexer2::typeToString (type) << "\n";
std::cout << " token '" << token << "' " << Lexer::typeToString (type) << "\n";
/*
// High-level tokens.
auto all = Lexer2::tokens (argv[i]);
for (auto token : Lexer2::tokens (argv[i]))
std::cout << " token '" << token.first << "' " << Lexer2::typeToString (token.second) << "\n";
auto all = Lexer::tokens (argv[i]);
for (auto token : Lexer::tokens (argv[i]))
std::cout << " token '" << token.first << "' " << Lexer::typeToString (token.second) << "\n";
*/
}
}