omicron
3db9fd9b8f
Added object file format spec
...
Validate the build / validate-build (push) Successful in 25s
This is a WIP.
2025-04-03 00:49:31 +02:00
omicron
0d3881f680
Update the test input file to contain all AST nodes
Validate the build / validate-build (push) Successful in 36s
2025-04-02 21:41:27 +02:00
omicron
5ea942024f
add functionality to main to parse and print the ast
2025-04-02 20:57:02 +02:00
omicron
b4757e008c
Add parse_result_wrap to wrap a result with another parent node
...
Use the new wrap function to wrap numbers and immediate nodes
2025-04-02 20:57:02 +02:00
omicron
b70b6896bf
Partial parser implementation
2025-04-02 20:56:59 +02:00
omicron
6ca7bb3661
Fix incorrect size comparison in lexer_consume_n
...
The buffer length len and the requested number of tokens n are mixed up
in an invalid comparison. This causes all valid requests for n < len
tokens to be denied and all invalid requests for n > len tokens to be
accepted. This may cause a buffer overflow if the caller requests more
characters than they provide space for.
2025-04-02 20:41:49 +02:00
omicron
d424c0f886
Add a parser combinator to parse a delimited list
2025-04-02 20:41:49 +02:00
omicron
c66489dd90
Add basic parser combinators
2025-04-02 20:41:49 +02:00
omicron
44fa66c2b7
Add "primitive" parsers for all the non-trivia tokens in the lexer grammar
2025-04-02 20:41:42 +02:00
omicron
c48adb1306
Add basic parser utilities
2025-04-02 20:38:35 +02:00
omicron
5fb6ebef28
Add functions to skip over trivia in a tokenlist
2025-04-02 11:59:24 +02:00
omicron
bbdcad024f
Add function to print the AST
2025-04-02 11:50:25 +02:00
omicron
935da30257
Add basic AST functionality
2025-04-02 11:35:53 +02:00
omicron
34ace36920
Add a parser grammar
2025-04-02 11:28:58 +02:00
omicron
bd37ddaeea
Add tokenlist, a linked list of lexer tokens
...
The linked list is doubly linked so the parser can look forward into it
and error reporting can look backward.
This commmit also reworks main to use the tokenlist instead of dealing
with the lexer manually.
2025-03-31 18:43:34 +02:00
omicron
42da7b1d05
Move err_allocation_failed into error.c and make it available to
...
everyone.
2025-03-31 18:43:34 +02:00
omicron
75fc72c35d
Add action to run validation on every commit
...
Validate the build / validate-build (push) Successful in 23s
Adds some flags to the makefile to make it build on alpine with a
different libc
2025-03-31 14:36:15 +02:00
omicron
5cdb60d395
Remove peek function
2025-03-30 22:51:47 +02:00
omicron
e5830daac9
Add documentation comments to the lexer code
2025-03-30 22:51:15 +02:00
omicron
4becfb868e
Reduce excessive line length in Makefile
2025-03-30 22:07:35 +02:00
omicron
942dd444cc
Fix infinite loop when lexing an invalid newline sequence
2025-03-30 22:03:12 +02:00
omicron
55f6dff543
Add basic fuzzing with afl++
2025-03-30 22:01:53 +02:00
omicron
df948b18c6
Initial commit, basic lexer structure
2025-03-30 17:45:51 +02:00