aboutsummaryrefslogtreecommitdiffstats
path: root/sources/apps/parsertest/ptest.cpp
blob: 28aabac30b5a3186c124072bbd427c577104f839 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <string>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string.h>
#include "prog.h"
#include "parser.h"

int main()
{
  // https://stackoverflow.com/questions/2602013/read-whole-ascii-file-into-c-stdstring
  std::ifstream t("example.smc");
  std::stringstream buffer;
  buffer << t.rdbuf();
  string program = buffer.str();
  Parser p;
  p.parse_program(program);
}