Skip to content

Commit

Permalink
today()
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph2 committed Jul 19, 2024
1 parent ce58d8b commit 6f61b35
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions pya2l/if_data_parser.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

#include "a2llg.h"
#include "antlr4-runtime.h"
#include "ifdata.hpp"

using namespace antlr4;

int main() {
std::ifstream stream;

#if 0
if (argc == 2) {
stream.open(argv[1]);
}
else {
// stream.open("C:/csProjects/pyA2L/examples/xcp100.aml");
stream.open("C:/csProjects/pyA2L/pya2l/examples/AML.tmp");
}
#endif

stream.open("C:\\csProjects\\pyA2L\\pya2l\\examples\\some_if_data.txt");

ANTLRInputStream input(stream);

auto ifd_lexer = a2llg(&input);

auto tk = ifd_lexer.getAllTokens();
for (const auto& tok : tk) {
auto tp = tok->getType();
std::cout << tok->getText() << " : " << tp << std::endl;
}

return 0;
}

0 comments on commit 6f61b35

Please sign in to comment.