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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user