dabab1e870
Add a null reference that doesn't call malloc.
2018-04-06 23:53:40 -07:00
60d22c2511
Remove types, while their implementation is not thought out.
2018-04-01 00:18:53 -07:00
e6801255fa
Add a vector of reference counted values.
2018-03-31 22:18:36 -07:00
35fc0e7fd1
Begin the implementation of a type.
2018-03-31 15:54:59 -07:00
c5fa68fdf5
Implement an initial version of reference counting.
2018-03-30 22:37:30 -07:00
7dd81f5e9b
Remove unused (and non-existent) header from code.
2018-03-30 20:51:11 -07:00
26ad341a50
Switch the table to using tries.
2018-03-24 20:47:34 -07:00
56c891f9f8
Implement foreach for the trie.
2018-03-24 20:40:42 -07:00
3f2859a119
Update libds and liblex.
2018-03-24 17:17:06 -07:00
dfcda0d6c3
Update liblex and libds.
2018-03-24 16:55:54 -07:00
7afe1a37e4
Implement a trie, sans removal.
2018-03-24 02:01:39 -07:00
77123561f0
Add a function to check if a tree node has a scope.
2018-03-24 00:36:10 -07:00
b6ab42f53a
Check for NULL where tree can be NULL.
2018-03-18 23:42:49 -07:00
94f1a11f15
Replace C++-style comments with C90 compatible ones.
2018-03-18 19:21:09 -07:00
9500a6f9b0
Make a single "operator" token, and specialize after parse.
2018-03-17 20:56:25 -07:00
156c02908d
Allow operators to mean different things despite having the same string.
2018-03-17 18:32:49 -07:00
7ab5eba529
Make distinction between prefix and postfix unary operators in trees.
2018-03-17 18:25:23 -07:00
4e86ccc253
Use new table features to improve searching for operators.
2018-03-17 18:01:52 -07:00
6b438dbc6d
Store the operator type in the corresponding table entry.
2018-03-17 17:38:13 -07:00
ff630c2ce4
Update libds and liblex.
2018-03-17 17:24:50 -07:00
7d3ec550e8
Fix bug causing incorrect handling of prefix operators.
2018-03-17 15:31:14 -07:00
c131fbc758
Implement reserved operator parsing.
2018-03-16 23:09:41 -07:00
27acfb0be7
Register reserved operators as tokens.
2018-03-16 23:09:11 -07:00
d25c1a379a
Add function to search for reserved operators.
2018-03-16 22:11:48 -07:00
ab2311def9
Store function / operator types when they are registered.
2018-03-15 19:41:11 -07:00
429c0bde3e
Add syntax sugar for let.
2018-03-14 13:30:20 -07:00
bb61dbcd54
Add support for the return keyword.
2018-03-08 21:31:24 -08:00
f3f1cc8c43
Rename all the tree enums to have a prefix.
...
This prevents some possible naming collisions.
2018-03-08 21:13:25 -08:00
2d26e45e90
Add function node parsing.
2018-03-08 21:10:05 -08:00
2487cdebe0
Add the ability to parse types.
...
This ability is not integrated with the rest of the parser - in fact, the grammar for things like function declarations (where type declarations are necessary) is not yet determined.
2018-03-06 16:47:11 -08:00
45d955b8bd
Add utility functions for copying strings.
2018-03-06 16:45:55 -08:00
bb26405df0
Add a parse type struct, used to hold type data as it is parsed.
2018-03-06 16:45:43 -08:00
55f397d732
Update liblex.
2018-02-28 13:48:28 -08:00
ac8e2ff418
Implement the do-while loop.
2018-02-27 12:30:37 -08:00
976b6d1b1a
Add code to parse while loops.
2018-02-27 11:57:45 -08:00
1d0ea602a5
Make expression parsing parse more valid syntax.
2018-02-27 11:45:51 -08:00
c8ec93880e
Add a macro to considerably simplify child parsing code.
2018-02-27 11:29:59 -08:00
127a59ba50
Add comments to the debug header.
2018-02-27 11:08:14 -08:00
08513a2315
Add function to print to file.
2018-02-26 18:14:31 -08:00
2823b0b66b
Fix bug in order of operations processing.
2018-02-26 13:51:37 -08:00
65071d47b3
Add a function to print the parse tree.
2018-02-25 23:09:35 -08:00
c18a5e49de
Add the call node as one of the nodes that contains a vector.
2018-02-25 23:09:13 -08:00
88108bb3c0
Make the has string and has vector functions public.
2018-02-25 22:57:45 -08:00
52ac67026f
Remove function tokens. If functions are first class, they're variables.
2018-02-25 14:12:34 -08:00
7a84babf1e
Add basic function call parsing.
2018-02-24 20:08:17 -08:00
052fc5b943
Fix bugs in the if-statement parser.
2018-02-24 20:07:54 -08:00
b19adef236
Abstract creating nodes with both strings and vectors.
2018-02-24 20:07:44 -08:00
d26cb6283c
Fix bug causing incorrect postfix parsing.
2018-02-21 19:16:42 -08:00
a3e1fdd46e
Clean up code in places suggested by static analysis.
2018-02-21 19:06:00 -08:00
0541c18a91
Fix bug causing the free function miss freeing a vector.
2018-02-21 19:00:04 -08:00