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:
12
stdlib/util.krak
Normal file
12
stdlib/util.krak
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
template<T> T greater(T a, T b) {
|
||||
if (a > b)
|
||||
return a;
|
||||
return b;
|
||||
}
|
||||
|
||||
template<T> T lesser(T a, T b) {
|
||||
if (a > b)
|
||||
return b;
|
||||
return a;
|
||||
}
|
||||
Reference in New Issue
Block a user