Fixed some bugs in Parser::firstSet and added a bit of caching. It still doesn't work quite right, though, there's some problem with nullable left recursion. However, it's better than it was, and I need to go to bed. More work later.

This commit is contained in:
Nathan Braswell
2014-06-30 01:57:50 -07:00
parent 12f57f8ce8
commit 03770028ad
19 changed files with 273 additions and 78 deletions

View File

@@ -2,6 +2,10 @@ __if_comp__ __C__ __simple_passthrough__ """
#include <stdio.h>
"""
void println() {
print("\n");
}
void print(char* toPrint) {
__if_comp__ __C__ {
__simple_passthrough__ """
@@ -13,7 +17,7 @@ void print(char* toPrint) {
void println(char* toPrint) {
print(toPrint);
print("\n");
println();
}
void print(int toPrint) {
@@ -27,7 +31,7 @@ void print(int toPrint) {
void println(int toPrint) {
print(toPrint);
print("\n");
println();
}
void print(float toPrint) {
@@ -41,6 +45,6 @@ void print(float toPrint) {
void println(float toPrint) {
print(toPrint);
print("\n");
println();
}