Commit 137ce0b5 authored by Sarah Spall's avatar Sarah Spall Committed by Vikram Narayanan

fixed bug in Makefile, and fixed bug in main file

parent d90c0cac
......@@ -5,13 +5,13 @@ compiler: flounder_parser.o idl_compiler.o ast.o
g++ flounder_parser.o idl_compiler.o ast.o -o compiler
idl_compiler.o: idl_compiler.cpp flounder_parser.h
g++ -c idl_compiler.cpp flounder_parser.h
g++ -c -g idl_compiler.cpp flounder_parser.h
ast.o: ast.cpp ast.h
g++ -c ast.cpp ast.h
g++ -c -g ast.cpp ast.h
flounder_parser.o: flounder_parser.cpp flounder_parser.h
g++ -c flounder_parser.cpp flounder_parser.h
g++ -c -g flounder_parser.cpp flounder_parser.h
flounder_parser.cpp:
vembyr-1.1/peg.py --cpp flounder > flounder_parser.cpp
......@@ -20,5 +20,5 @@ flounder_parser.h:
vembyr-1.1/peg.py --h flounder > flounder_parser.h
clean:
rm flounder_parser.* *.o compiler vembyr-1.1/peg_peg.py
rm flounder_parser.* *.o compiler peg_peg.py
vembyr-1.1/peg_peg.pyc
\ No newline at end of file
......@@ -2,6 +2,7 @@
#include "flounder_parser.h"
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
int main(int argc, char ** argv)
{
......@@ -10,10 +11,19 @@ int main(int argc, char ** argv)
printf("Must provide a filename.");
exit(0);
}
char * filename = argv[1];
Interface * tree = (Interface *) Parser::parse(filename);
printf("testing");
exit(0);
try
{
printf("getting filename");
char * filename = argv[1];
printf("%s",filename);
Interface * tree = (Interface *) Parser::parse(std::string(filename));
printf("testing");
exit(0);
}
catch (const Parser::ParseException &e)
{
printf("caught an exception");
std::cout << e.getReason();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment