Commit Graph
100 Commits
Author SHA1 Message Date
Partho 07255a5193 added a lot of new fucntions 2025-05-06 14:16:21 -04:00
Partho 8b177b2807 tweaking statement options 2025-05-06 04:38:35 -04:00
Partho e3081f35a4 tweaking statement options 2025-05-06 02:45:17 -04:00
Partho 7e6bb2af83 working on making sure arrays and reserve/release are working properly 2025-05-04 21:04:37 -04:00
Partho 6d6beda20e added more extra cases for get prim size 2025-05-04 15:17:40 -04:00
Partho 616a7b6b67 added extra case for get prim size 2025-05-04 15:13:48 -04:00
Partho 6b239b0724 added reference to function scopes 2025-05-03 14:16:31 -04:00
Partho c32e85c24b updated symbol table entry add order 2025-05-02 17:22:45 -04:00
Partho f2affd8a55 finished more type check stuff and some loops 2025-04-30 02:27:52 -04:00
Partho 6d26ba25b0 finished type checking issues 2025-04-30 01:25:11 -04:00
Partho 69b8019a8b added some emissions 2025-04-29 23:28:04 -04:00
Partho e092ea3926 some emission 2025-04-29 23:14:35 -04:00
Partho 0b727c06fc deleted 2025-04-29 22:42:28 -04:00
Partho 789d67d0b6 IR stuff 2025-04-29 22:07:21 -04:00
Partho 58c41fd6a4 almost finished type checks 2025-04-29 21:59:37 -04:00
Partho 4ba6c0d251 fixed type checking issues I think 2025-04-29 19:01:57 -04:00
Partho dcdcf31068 still fixing assignable type checking 2025-04-29 14:42:19 -04:00
Partho 49b83cd8ad updated errok placements 2025-04-28 00:06:54 -04:00
Partho 31e8517601 fixed more type checks, just assignable issues left 2025-04-27 21:51:46 -04:00
Partho 94815e237a fixing type checks 2025-04-27 20:57:30 -04:00
Partho 1999230265 got compilation to work 2025-04-25 16:55:27 -04:00
Partho 46d8a852a6 trying to get annie's to work 2025-04-25 15:36:31 -04:00
Partho 95c37db9ff fixing still 2025-04-25 13:37:32 -04:00
Partho f0d81ff5fd combined symbol table with IR in this branch 2025-04-25 13:01:31 -04:00
Partho e0c577a7ef updated grammar to pass up instances. Still need IR to compile to properly emit 2025-04-23 18:49:09 -04:00
Partho b023ac0133 commented out second yyparse() in runner in run 2025-04-15 20:22:24 -04:00
Partho 90f9eb2f00 added entries for reserve and release 2025-04-15 19:44:46 -04:00
Partho 8057060f26 fixed several small issues 2025-04-15 01:40:18 -04:00
Partho f2db338257 fixed type check issues with records as params 2025-04-14 12:33:52 -04:00
Partho 5c6ab34518 fixed issue with records being size of their reference (8 bytes) not their actual total 2025-04-14 11:43:49 -04:00
Partho 3baa95288a fixed issue with not printing array instances in symbol table 2025-04-14 02:01:51 -04:00
Partho 3fc7a6371a have to finish idlist rules 2025-04-11 19:00:24 -04:00
Partho e8bad44949 fixed print symbol table and added primitive types 2025-04-11 16:37:57 -04:00
Partho 55bc098de5 edited function definitions 2025-04-11 16:28:16 -04:00
Partho 3e1e159561 starting to work on grammar fixes 2025-04-11 15:45:33 -04:00
Partho f6dabd8d03 working on make sure types pass properly in grammar 2025-04-11 14:02:34 -04:00
Partho 413a4854b4 tweaked get parameter 2025-04-11 13:11:48 -04:00
Partho 541a2ba44a tweaked get return 2025-04-11 13:08:43 -04:00
Partho 8bc5997996 fixed getReturn to not return NULL 2025-04-11 12:55:14 -04:00
Partho df8c9fb661 updated print symbol table to use getters 2025-04-11 12:50:24 -04:00
Partho 859ff3fd03 added offset code in symbol table for records 2025-04-09 15:15:17 -04:00
Partho 3010ad6517 Added more debug statements 2025-04-08 18:16:56 -04:00
Partho faf592a725 Added most type checking. Entries seem printing mostly OK in table. 2025-04-08 18:12:11 -04:00
Partho e42e537339 ran through derefenced most if not all of the pointers 2025-04-07 12:32:20 -04:00
Partho e2aa9e7c12 fixed header for this branch 2025-04-04 21:40:13 -04:00
Partho 6a6677ccb5 checking diff 2025-04-04 21:12:26 -04:00
Partho f6abbbd67f updated to change strings to nodes in most locations 2025-04-04 20:24:05 -04:00
Partho 0eb0b8097c updated lex to return the right values to the tokens (mostly table entries) 2025-04-03 20:05:53 -04:00
Partho 3186d363ed fixed print symbol table to not print scopes used as flags 2025-04-02 20:31:00 -04:00
Partho 692025412e fixed getAdInfo function 2025-04-02 13:16:56 -04:00
Partho 5e01b93af8 edited while loops in grammar to not look for comparison to NULL. Undefined instead 2025-03-31 20:42:17 -04:00
Partho c61a87634c fixed NULL check from getNextEntry 2025-03-31 20:31:53 -04:00
Partho 0593673d89 fixed the NULL checks for the incorrect ORs 2025-03-31 12:32:36 -04:00
Partho 57ba34ab37 added a bunch of NULL checks 2025-03-28 22:22:58 -04:00
Partho 227cec0b73 continuing. need fix of makefile 2025-03-28 18:02:40 -04:00
Partho Bhattacharya cca01eb0b5 working on tabel 2025-03-28 14:49:17 -04:00
Partho Bhattacharya 37dedf1818 fixed some grammar rules 2025-03-28 14:16:49 -04:00
Partho Bhattacharya 36694a2f4a updated lookups to return undefined entry if invalid 2025-03-28 13:47:53 -04:00
Partho Bhattacharya 2654308396 fixed expression rules 2025-03-28 02:14:50 -04:00
Partho Bhattacharya 38a1d0b091 added more helper functions 2025-03-28 02:02:44 -04:00
Partho Bhattacharya d7f6272d37 still editing grammar 2025-03-27 23:37:04 -04:00
Partho Bhattacharya c93534e9d4 added setRecSize 2025-03-27 20:10:14 -04:00
Partho Bhattacharya 8f1c7590bd added get number of entries function 2025-03-27 19:23:05 -04:00
Partho Bhattacharya 3686a64948 symbol_table print almost done but have to figure out seg fault 2025-03-27 04:44:13 -04:00
Partho Bhattacharya c4ad1547bf fixed most symbol table structure issues. Working on print symbol table 2025-03-27 04:00:30 -04:00
Partho Bhattacharya 04418cc75d added testing suite for binary and unary operations typechecking 2025-03-27 03:06:58 -04:00
Partho Bhattacharya 22c1a79e03 added more helper functions. still have to update print symbol table function 2025-03-26 18:42:09 -04:00
Partho Bhattacharya 27fb88f866 updated branch to not crash due to getType issue 2025-03-26 16:21:57 -04:00
Partho Bhattacharya 0ff894d571 fixed most things in the symbol table structure. Seeing core dumps and have to fix the print symbol table function 2025-03-26 15:21:42 -04:00
Partho Bhattacharya 0c8c3e30f3 adding function to get adinfo type 2025-03-26 11:17:45 -04:00
Partho Bhattacharya d1f7041c31 added enum return function 2025-03-26 10:54:04 -04:00
Partho Bhattacharya d817ceaf7d added comments to symbol table.c for clarity. Note- we need to add scope reference to record instead of array reference. Additionally, in print symbol table.c we need to update for if an entry is a function, it should print out parameter->return type 2025-03-24 11:59:53 -04:00
Partho Bhattacharya 78b3539de6 changed 'string primitive' to 'string' 2025-03-14 22:47:29 -04:00
Partho Bhattacharya 1544f2b728 all compilation errors are gone. Function Types are properly entering Symbol Table. Some Type checking is taking place among expressions. 2025-03-14 22:42:08 -04:00
Partho Bhattacharya 78f1cd3fbb Got symbol Table largely working (but without certain entries being added like functions or records) 2025-03-14 20:48:11 -04:00
Partho Bhattacharya ead70170c0 added a remove entry function 2025-03-14 19:58:53 -04:00
Partho Bhattacharya 8a1477c04d started updating values to types 2025-03-14 15:11:03 -04:00
Partho Bhattacharya 9361ed62e7 added a type check function in symbol table 2025-03-14 14:46:31 -04:00
Partho Bhattacharya 63534d1daf restructured table, still have to update print table properly as well as grammar rules 2025-03-14 13:35:25 -04:00
Partho Bhattacharya f0e0d7bdbc still working through symbol_table to try and get it to compile soon but fixed issues with storing values and calling the right element of a struct 2025-03-14 12:04:53 -04:00
Partho Bhattacharya 392a4b3ba5 wrote up symbol table structure. Have to correct code and then add type checking grammar rules 2025-03-14 05:32:24 -04:00
Partho Bhattacharya f0e03b2724 save point for tweaking symbol table--note won't be currently working 2025-03-14 04:24:03 -04:00
Partho Bhattacharya 3db6191969 fixed symbol_table entries not working 2025-03-12 10:27:48 -04:00
Partho Bhattacharya 2f04671123 updated get entry function to get string pointers instead of creating different strings. Also created a define function for top level scopes. Create Entry does not work for top level 2025-03-10 11:56:26 -04:00
Partho Bhattacharya 3a22ecbcdc fixed declaration name 2025-03-07 15:50:15 -05:00
Partho Bhattacharya d1c36566c7 still working on resolving type name issue 2025-03-07 15:22:10 -05:00
Partho Bhattacharya f33b4566ea fixed precedence testing 2025-03-07 13:40:29 -05:00
Partho Bhattacharya 6dcad07520 fixed precedence tests 2025-03-07 13:36:07 -05:00
Partho Bhattacharya 211919d70e fixed location issues for error messages and scoping. Used location macros and the percent location as defined in guides to track location. Code may warrant cleanup as we don't need to manually keep track of locations ourselves any more through our line and column number variables 2025-03-06 02:05:47 -05:00
Partho Bhattacharya f819a68ef7 runner and parser together add entries ok 2025-03-05 15:02:30 -05:00
Partho Bhattacharya d34a4d3a55 Merge branch 'Sprint2-BlockHandlingGrammar-FE-t#34' of github.com:UB-CSE443/compiler-the-translators into Sprint2-BlockHandlingGrammar-FE-t#34 2025-02-28 18:19:49 -05:00
Partho Bhattacharya 63212a3d63 entries are working but not freeing memory so potential for leaks 2025-02-28 18:16:44 -05:00
Partho Bhattacharya 2695334db9 added print statements to gramamr rules to check for debugging 2025-02-28 15:42:43 -05:00
Partho Bhattacharya 2808a75dc9 edited some grammar rules. Still running into syntax errors 2025-02-28 14:03:53 -05:00
Partho Bhattacharya 046cb4b171 solved shift-reduce errors 2025-02-28 11:50:18 -05:00
Partho Bhattacharya 078b059d1c parser compiling 2025-02-27 20:28:39 -05:00
Partho Bhattacharya d609dd2dca added skeleton rules and grammar to bison file 2025-02-27 20:03:50 -05:00
Partho Bhattacharya fad44e21ea added print table functionality to main in grammar.y with custom EOF input in '!' 2025-02-27 17:58:01 -05:00
Partho Bhattacharya c85540afdf updated testing for parser 2025-02-27 15:22:02 -05:00
Partho Bhattacharya 5626a5c371 testing why grammar does not work 2025-02-27 14:13:19 -05:00