a6348b7b5a
add enum support
2025-10-30 18:05:44 +03:00
2f75e80bc9
add c-or/c-bit-or/c-bit-or= support
2025-10-30 18:05:44 +03:00
3af850b111
fix designated initializer assignment producing extra parens
2025-10-30 18:05:44 +03:00
c517b522ad
fix structure attributes
2025-10-30 18:05:44 +03:00
1b721b34a0
fix fmt-c while without body
2025-10-30 18:05:44 +03:00
55a0235a37
add initial prelude
2025-10-30 18:05:44 +03:00
47affc449f
add typedef support
2025-10-30 18:05:44 +03:00
0d314388f0
fix arrays of structs, multiple struct fields with same type
2025-10-30 18:05:44 +03:00
9c3d2f61c2
update Readme
2025-10-30 18:05:44 +03:00
f9c58b21b4
overhaul fmt-c-writer completely
...
It now looks very nice.
2025-10-30 18:05:44 +03:00
851abd1ac2
prettify reader test with a nice macro
2025-10-30 18:05:44 +03:00
48a3d06925
move Sex to better types
...
Types, fns and vars are now written in another, better, more intuitive
and readable way.
Types:
"pointer to const char" is "* const char"
"array of pointers to volatile int" is "[* volatile int]"
Read left to right
Vars (as well as fn args, struct fields):
(var name type)
(struct vec3 ((x float) (y float) (z float))
(fn vec3-add ((v1 vec3) (v2 vec3)) vec3 ...)
Also fns are now have return types after arg list.
* is now must not be attached to any type name (or variable for that
matter)
2025-10-30 18:05:44 +03:00
2228ab3b50
fix variuos struct-related issues in fmt-c
...
There were bugs, when struct in arg list and pointers to structs among
struct fields produces such code as:
(fn puk ((arg (* struct foo))) ...) -> void puk(struct foo { *; } arg)
(struct l ((next (* struct l)))) -> struct l { struct l { *; } next };
And so on.
2025-10-30 18:05:44 +03:00
3d11426165
move basic and semen tests to groups
2025-10-30 18:05:44 +03:00
45d9199c27
add reader syntax for []
...
Now [...] reads to (¤ ...) for easy semantic processing
2025-10-30 18:05:44 +03:00
036f82facf
add couple list utils
...
list-split and list-join
2025-10-30 18:05:44 +03:00
ca7202924e
fix missing logo itself
2025-10-16 15:38:51 +03:00
9d21443f01
fix logo markdown rendering
2025-10-16 15:38:00 +03:00
d9b1b9aae8
add logo
2025-10-16 15:32:09 +03:00
dc35584331
fix passing CSC_FLAGS from command line
2025-10-02 00:16:34 +03:00
fd61e753dc
fix tests
2025-10-01 16:29:46 +03:00
Pavel Kulyov
77845d24c7
Update readme
2025-10-01 15:54:17 +03:00
Pavel Kulyov
fb38e5b509
readme: remove extra closing bracket
2025-10-01 15:54:17 +03:00
Pavel Kulyov
07f0039a21
ci: add initial GHA with building sexc and running tests
2025-10-01 15:54:17 +03:00
Pavel Kulyov
d48bef364a
Add dependencies file
2025-10-01 15:54:17 +03:00
775e321597
add support for nested lambdas
2025-10-01 14:10:42 +03:00
442f663635
add initial lambda support
...
No closures for now, but solid groundwork is laid.
2025-09-30 09:35:16 +03:00
d87f0ba161
enable prefix form for keywords
...
I like writing :keyword more than #:keyword. That hash sign seems
redundant
2025-09-30 09:35:16 +03:00
462916b7a9
don't force c89 after all
2025-09-30 09:35:16 +03:00
072d3a64aa
update Readme.org
2025-09-30 09:35:16 +03:00
06892e1afa
re-implement macro-expansion using new semantic walker
2025-09-29 15:56:51 +03:00
532487d713
implement semantic code walking framework
2025-09-29 15:56:51 +03:00
ea5a2c0843
add binaries to .gitignore
2025-09-29 15:56:51 +03:00
3c5ea13678
add .gitignore
2025-09-29 15:50:01 +03:00
b1744bb6af
split semantic processing and fmt-c code generation
...
Introducing Sex SEMantic ENgine: the semen.
Also split reader to other file (it can be replaced in the future).
Macro expansion inside Sex code doesn't work yet, and it must be done
in semen, not during fmt-c generation as before.
2025-09-29 15:50:01 +03:00
8e4cc98522
fix sexc using non-existent unit
2025-09-01 11:24:08 +03:00
6a9885ebb0
add bool true false tests
2025-08-22 15:47:36 +03:00
53e9614584
don't create temp files when compiling
2025-08-22 15:47:36 +03:00
8bbf44f329
split test in separate test files
2025-08-22 15:47:36 +03:00
97d44a0050
add union to emacs.el keyword list
2025-08-22 15:47:36 +03:00
d5e443a72c
force c89 pedantic compilation mode
2025-08-22 15:47:36 +03:00
63918d23c0
fix newline and whitespace after braces in generated C blocks
2025-08-22 15:47:36 +03:00
c9848151d0
generate void in empty argument lists
2025-08-22 15:47:36 +03:00
103e95fcf7
don't use int as default type for variables, generate error instead
2025-08-22 15:47:36 +03:00
78977e988e
add support for begin in Sex
...
begin-wrapped blocks are now creating lexical scopes
2025-08-22 15:47:36 +03:00
8ad5abf055
update Readme.org
2025-08-08 19:52:02 +03:00
Pavel Kulyov
5a0076ad71
readme: fix typo
2025-08-06 21:22:35 +03:00
Pavel Kulyov
d7055814d3
readme: use proper language modes for source code snippets
2025-08-06 21:22:35 +03:00
ea13df186f
add structure attributes support to sex
2025-08-06 15:38:04 +03:00
a6800aaeb6
fix nested structures in fmt-c
2025-08-06 15:38:04 +03:00