Pavel Kulyov
e2fb4adae5
readme: add docs about static compilation
2026-09-18 00:26:17 +03:00
Pavel Kulyov
e3da2a1e79
Update gitignore
2026-09-18 00:26:17 +03:00
Pavel Kulyov
79ce3dace2
Add project-local dependencies installation
2026-09-18 00:26:16 +03:00
a221e0f8ea
build the triangle on Linux too
...
Sex CI / build-linux (pull_request) Successful in 4m44s
Sex CI / build-linux (push) Successful in 5m18s
<OpenGL/gl3.h> does not exist there and -framework is not a gcc flag,
so the documented build line failed with no hint why. #+macosx picks
the header now, and both build lines are in the file -- pkg-config
carries the flags on either platform, apart from Apple's GL framework,
which has no pkg-config file to carry.
2026-09-16 18:01:02 +03:00
bf83baa508
read-time feature expressions
...
'#+' and '#-' introduce conditional compilation: the form that follows
is kept only when the feature expression is true, and otherwise is read
and thrown away. An expression is a feature name, or and / or / not
of them.
They are read time, not compile time.
Default features are the host's software-version, software-type and
machine-type as CHICKEN reports them, plus what --features flag adds.
2026-09-16 17:59:37 +03:00
6e4cb80424
make sextest's (compilation ...) form work
...
1. Look for `compilation', not `compile' among the source
2. Read the file with provided --features from the (compilation ...)
form, then handle resulting file to sexc
2026-09-16 17:48:44 +03:00
294a275905
fail when the C compiler fails, and clean up when we do
...
compile-to-file returned process-wait's values and main dropped them,
so cc errors were printed, but then main compiler exited 0.
Also cleanup tmp C files when compilation failed.
2026-09-16 17:34:24 +03:00
9763f5fa8d
export explicitly from the test build's types module
2026-09-16 17:29:53 +03:00
97ef62b7f4
resolve typedefs in get-fields and map-fields
...
Now these macro helpers take in account the possibility of typedefing
one type to another, and correctly find the one intended
2026-09-16 17:07:21 +03:00
847bb14340
accept pub enum, and enums used as types
...
Implement pub support for enums, and also anonymous enums declared
in-place.
Also give the cdr of a `pub' form the form's own location, so a
error about what follows `pub' can say where it was written
2026-09-16 17:02:45 +03:00
d0d0ea8e84
process imported forms as toplevel, not as text
...
1. register imported types
2. protect against multiple imports (diamond, circular)
2026-09-16 16:57:34 +03:00
85bf1c163c
generate temp .c files instead of passing to compiler's stdin
...
Sex CI / build-linux (pull_request) Successful in 4m44s
For a clearer architecture
2026-09-15 21:28:41 +03:00
0b2b97a0c6
add type database and compile-time reflection
2026-09-15 21:28:41 +03:00
dae19715df
add module testing
...
Also fix module import
2026-09-15 21:28:41 +03:00
522c5a2c01
reject nested pointer types with proper error message
2026-09-15 21:28:41 +03:00
28ad33ca38
add sex-error reporting
2026-09-15 21:28:41 +03:00
e751ce2cb9
add sdl3 triangle example
2026-09-15 21:28:41 +03:00
Pavel Kulyov
df5a933f01
ci: use gitea actions platform without access to github
...
Sex CI / build-linux (pull_request) Successful in 4m38s
Sex CI / build-linux (push) Successful in 4m39s
Fortunately Gitea actions runner is not too tied to GHA, so
just eliminating `uses:` clauses we can get a little more freedom
in sex.
2026-09-15 20:47:40 +03:00
5f9f90ef37
support || | |= operators, since we now have our own parser
Sex CI / build-linux (pull_request) Failing after 3m1s
Sex CI / build-linux (push) Failing after 3m1s
Sex CI / build-macos (push) Has been cancelled
Sex CI / build-macos (pull_request) Has been cancelled
2026-09-15 20:18:20 +03:00
7e6e32488b
fix stray commas and add comment packing
Sex CI / build-linux (pull_request) Failing after 3m1s
Sex CI / build-macos (pull_request) Has been cancelled
2026-09-15 16:32:55 +03:00
fa4ad5acee
fix comments inside statements shifting their meaning
2026-09-15 16:32:55 +03:00
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