Commit Graph

185 Commits

Author SHA1 Message Date
4dcf422757 Prevent infinite loop in block interpretation. 2018-04-24 11:47:50 -07:00
46040531fb Add interpreter to libab. 2018-04-24 11:35:27 -07:00
a86938b574 Use reference counted table in libab. 2018-04-24 11:35:16 -07:00
cea057aaa6 Switch tables to use refcounting. 2018-04-24 11:13:47 -07:00
251ce4e66e Start the interpreter code. Construct a basic scaffold. 2018-04-23 14:49:33 -07:00
43a22d7492 Ensure reference is always initialized. 2018-04-22 21:24:43 -07:00
ac26c4dbd0 Add a function to construct and wrap a parsetype in a refcount. 2018-04-22 20:44:30 -07:00
db84019846 Add a way to construct a parsetype form existing types and a basetype. 2018-04-22 20:44:08 -07:00
b12f6d7a31 Add a number implementation struct to libab. 2018-04-21 17:32:38 -07:00
596e1419b4 Revert "Add a description of the internal array data structure."
Let's focus on the core features, and add the fluff later.
2018-04-21 17:14:41 -07:00
d096e2155c Remove the free assumption from libab_ref. 2018-04-21 17:05:51 -07:00
5d3130d39d Format the code with clang-format. 2018-04-21 14:09:01 -07:00
22ed67f0a4 Add a description of the internal array data structure. 2018-04-21 13:54:28 -07:00
30578f27da Take precompiled type in register functions. User must call create_type. 2018-04-20 14:54:58 -07:00
7692d4541f Add function to compile a type from its string. 2018-04-20 14:54:23 -07:00
8214aa8344 Allow tree-based function implementations. 2018-04-20 09:26:18 -07:00
576f805bd7 Implement resolving basetypes. 2018-04-19 23:17:54 -07:00
3ada78a557 Use reference counting for types. 2018-04-17 22:14:28 -07:00
264f420186 Merge type and parsetype into a single struct.
It doesn't make sense to re-create the same structure, or even
re-allocated any of the memory.
2018-04-17 15:49:09 -07:00
ade89ebf79 Remove unused base type variant. 2018-04-17 12:55:41 -07:00
be670a659f Add results for bad types. 2018-04-17 12:55:30 -07:00
7b1445a262 Add functions for basetypes and their entries in tables. 2018-04-17 12:07:22 -07:00
b1a113a57d Add free function for freeing the custom structs. 2018-04-17 12:05:48 -07:00
af87c6646d Add initial implementation of types and values. 2018-04-12 23:54:58 -07:00
d146b71e56 Add an implementation of base types.
These will hold information about a type such as (possibly) the
interfaces it implements and the parameters it accepts.
2018-04-12 23:45:30 -07:00
0cfc1df02c Add placeholder types. 2018-04-07 14:50:06 -07:00
1960ded070 Add initial implementation of a reference counting trie. 2018-04-06 23:55:56 -07:00
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