Commit Graph

14 Commits

Author SHA1 Message Date
Simon Forman f0c94aeed8 regularize defs.txt; new andies.
I made a crude facility in the C impl for excluding definitions that
would replace built-in commands.  This should be improved, eh?

I also started on renameing the logical Boolean ops
https://todo.sr.ht/~sforman/thun-der/29
2023-02-14 08:27:17 -08:00
Simon Forman acfa19239e null, small
https://todo.sr.ht/~sforman/thun-der/23
2023-02-09 10:58:08 -08:00
Simon Forman 2be2d00e6b Handle definitions with non-alphanumeric chars in their names. 2023-02-08 12:50:23 -08:00
Simon Forman 05575d8a08 A bunch of definitions.
Still to do: the comparison functions.
2023-02-06 12:59:39 -08:00
Simon Forman d3a9a6ff7f A README file. 2023-02-05 14:54:33 -08:00
Simon Forman ccbf8d2b4c minor cleanup 2023-02-05 13:53:53 -08:00
Simon Forman 8bda5d511a Auto-generate defintions from defs.txt
But it doesn't yet handle names with non-C-indentifier characters in
them.
2023-02-05 13:50:16 -08:00
Simon Forman 291b6caa75 Generate definitions.h; swons 2023-02-05 13:38:59 -08:00
Simon Forman 78b59dda35 Put defs into a generated file.
This is only part of the solution, we still need to update joy.h and
KEYWORDS.txt when defs.txt changes, and we need to handle names that
have non-C-identifier characters in them.

But it's a start...
2023-02-05 13:04:31 -08:00
Simon Forman 6eae43c27f push_quote_onto_expression
doesn't push an empty list, unlike push_quote() which does.
2023-02-05 11:58:44 -08:00
Simon Forman bafb2a318b No clear def. 2023-02-05 10:05:20 -08:00
Simon Forman b1a06979c2 truthy 2023-02-04 23:45:13 -08:00
Simon Forman 7874496090 Definitions.
There are things to like about this implementation and things to
dislike.

Things to like:

- It works.
- The defs are baked into the wordlist.

Cons:

- The def bodies are built at start time by parsing strings.  it would
  be nice to somehow generate initializer literals if possible.  But
  would that mess up the garbage collector?
- It requires manual labor to update the defs when defs.txt changes.  It
  would be nice to have a solution that *make* can use.
2023-02-04 23:08:39 -08:00
Simon Forman 15482c1fdd A first attempt at definitions. 2023-02-04 22:58:38 -08:00