A README file.
This commit is contained in:
parent
ccbf8d2b4c
commit
d3a9a6ff7f
|
|
@ -0,0 +1,14 @@
|
||||||
|
Thun in C
|
||||||
|
---------------
|
||||||
|
|
||||||
|
This is my first attempt to write C in many years, I hope it's not too
|
||||||
|
embarassing.
|
||||||
|
|
||||||
|
I use Gperf to create a static wordlist. This make word lookup very
|
||||||
|
efficient, but there's no way currently to add definitions at runtime.
|
||||||
|
|
||||||
|
There's a janky script *convert\_defs.py* that generates *definitions.c*,
|
||||||
|
*definitions.h*, and *KEYWORDS.txt* from the *defs.txt* file. I would
|
||||||
|
like to replace the dependency on Python with, say, Awk or something.
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -102,5 +102,3 @@ Last, a set of functions to go in the wordlist, one for each definition.
|
||||||
for line in defs:
|
for line in defs:
|
||||||
name, body = line.split(None, 1)
|
name, body = line.split(None, 1)
|
||||||
print(f'void def_{name}(__attribute__((unused)) JoyListPtr stack, JoyListPtr expression) {{ push_quote_onto_expression(def_{name}_body, expression); }}')
|
print(f'void def_{name}(__attribute__((unused)) JoyListPtr stack, JoyListPtr expression) {{ push_quote_onto_expression(def_{name}_body, expression); }}')
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue