summaryrefslogtreecommitdiff
path: root/minic
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2018-06-24 21:20:29 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2018-06-24 21:20:29 +0200
commite3e508c5a33644dd2ffdd10cb7319521d292ca15 (patch)
treef6c6de6b9b54e4c0179ed865123772ec0541e113 /minic
parent1dea27eeaf888a48638c6975e9898fae532b87d2 (diff)
downloadcompilertests-e3e508c5a33644dd2ffdd10cb7319521d292ca15.tar.gz
compilertests-e3e508c5a33644dd2ffdd10cb7319521d292ca15.tar.bz2
forgot to add some files
Diffstat (limited to 'minic')
-rw-r--r--minic/parse.c31
-rw-r--r--minic/tests/README5
2 files changed, 36 insertions, 0 deletions
diff --git a/minic/parse.c b/minic/parse.c
new file mode 100644
index 0000000..0658908
--- /dev/null
+++ b/minic/parse.c
@@ -0,0 +1,31 @@
+#include "parse.h"
+
+#include "io.h"
+
+void parser_init( Parser *p, Scanner *s )
+{
+ p->s = s;
+}
+
+void parser_done( Parser *p )
+{
+}
+
+void parser_debug( Parser *p, int enable )
+{
+ p->debug = enable;
+
+ if( p->debug ) {
+ print( "PARSER DEBUGGING ENABLED" );
+ }
+}
+
+void parser_parse( Parser *p )
+{
+ scanner_Symbol s;
+
+ s = scanner_scan( p->s );
+
+ while( s.sym != S_eof ) {
+ }
+}
diff --git a/minic/tests/README b/minic/tests/README
new file mode 100644
index 0000000..bb2e8ea
--- /dev/null
+++ b/minic/tests/README
@@ -0,0 +1,5 @@
+test1.c - empty file
+test2.c - empty file with comment
+test2_err.c - empty file with unterminated comment
+test3.c - smallest possible program, one exit code, no command line arguments
+