36932fb480
add codegen and args tests, fix couple of bugs in C generation
2026-09-15 16:32:55 +03:00
d609a0c591
begin -> do
...
Shorter and doesn't imply existence of `end'
2026-09-15 16:32:55 +03:00
af6e778185
pass all args after '--' to C compiler verbatim
2026-09-15 16:32:55 +03:00
0db4a11a2b
add `comments' test program
2026-09-15 16:32:55 +03:00
d83ee32f12
add source line number preservation
...
Sex CI / build-macos (pull_request) Has been cancelled
Sex CI / build-linux (pull_request) Failing after 3m34s
For source-level debug. Add --line-directives option, defaulted to
statement. Disabled when used with -C. Explicit non-none value
overrides disabling when -C is present
2026-09-09 14:16:32 +03:00
528f26b7ef
migrate to Chicken 6
2026-09-09 12:45:12 +03:00
9903cae3f7
reuse sex reader in sextest
2026-09-09 12:45:12 +03:00
f6ec07a4b5
fix sex-tests and sextest not rebuilding
2026-09-09 12:45:12 +03:00
543a333165
fix tests/Makefile not cleaning up .o files
2026-09-09 12:45:12 +03:00
1ca77aaf59
replace Scheme read with our tokenizer and parser
...
Also implement . as field access operator and preserve ;-comments in
generated C
2026-09-09 12:44:52 +03:00
8ae2346e41
add small programs for compile testing
Sex CI / build-macos (push) Has been cancelled
Sex CI / build-linux (push) Has been cancelled
2026-05-27 18:00:18 +03:00
878d415e22
add command line options to sextest
Sex CI / build-linux (pull_request) Has been cancelled
Sex CI / build-macos (pull_request) Has been cancelled
Sex CI / build-linux (push) Has been cancelled
Sex CI / build-macos (push) Has been cancelled
2026-05-21 20:22:06 +03:00
c678df7978
add sextest test runner
...
A tool for testing Sex programs. Details in tools/sextest/README.org
2026-05-21 20:15:03 +03:00
b157315e3d
fix paren placing in fmt
...
Sex CI / build-linux (pull_request) Has been cancelled
Sex CI / build-macos (pull_request) Has been cancelled
Sex CI / build-linux (push) Has been cancelled
Sex CI / build-macos (push) Has been cancelled
Prior to the fix, the Sex code
`(while (!= EOF (= c (getc f))) ...)` expanded wrongly to
`while (EOF != c = getc(f)) { ...`, instead of
`while (EOF != (c = getc(f))) { ...`
2026-04-29 22:48:55 +03:00
24b3e71969
update sex-mode.el
...
- add switch and case indents
- add begin and default highlighting as keywords
2026-04-29 22:48:55 +03:00
a951fd81b6
remove utils.macros.scm as it is no longer needed
2026-04-29 22:48:55 +03:00
196694f18e
modularize sex
...
Also rename macros to sex-macros, module-system to sex-modules for
clarity, uniformity, and to avoid name clashes with Chicken's
units/modules named "macros" and "modules"
2026-04-29 22:48:55 +03:00
f5b3fcb399
add #line directive to generated C code to support source debugging
2025-12-01 15:42:06 +03:00
b2df79520e
fix stray atavistic } in Readme
2025-10-30 18:05:44 +03:00
f7bc65ddc3
fix extra closing paren in Readme example
2025-10-30 18:05:44 +03:00
c483b81f1c
replace fold-right append with flatten in type-convert-to-c
...
They are not equivalent, but it'll be allright in this
case. Probably. Passes tests at least.
2025-10-30 18:05:44 +03:00
9e50df5c44
add malformed fn form match case in fmt-c-writer
...
Spent like 10 minutes trying to understand why my fn pointer is being
fucked up in test case. Turned out I was missing return type, and
whole fn pointer type fall through down to defaut case.
2025-10-30 18:05:44 +03:00
e4c79bda75
rewrite Todo -> TODO
...
for better searchig I guess?
2025-10-30 18:05:44 +03:00
e9de3409ec
optimize fmt-c-writer type unwrapping
2025-10-30 18:05:44 +03:00
904a6fe3c9
fix Readme typos
2025-10-30 18:05:44 +03:00
Ekaterina Vaartis
fc332311d3
fix nested types producing wrong C code
2025-10-30 18:05:44 +03:00
0ad1d01fec
enable semen-walk-form to embed results (for macro processing)
2025-10-30 18:05:44 +03:00
b4145255bd
move recons to utils
2025-10-30 18:05:44 +03:00
951f96f340
add define support
2025-10-30 18:05:44 +03:00
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