feat: replace recursive descent parser with grammar-driven approach and add method call infrastructure

Refactor compiler.c to remove recursive descent parsing infrastructure (InfixCompiler, CompileFn, precedence enums) and replace with a simpler grammar-driven approach using statement(), call(), primary(), and number() functions. Add VM struct to compiler.h and vm.h with symbol table support, including getSymbol() for method name resolution. Introduce CODE_CALL opcode in VM interpreter with basic call dispatch. Update main.c to use new VM lifecycle (newVM/freeVM) and pass VM through compile and interpret calls.
This commit is contained in:
Bob Nystrom
2013-10-23 20:51:41 +00:00
parent 833c4fc6b2
commit 71c4c330ca
6 changed files with 110 additions and 237 deletions
+2 -1
View File
@@ -1 +1,2 @@
21212
123.ok
123.yar