Syntax Errors
The parser raises these errors when the token stream doesn’t match expected grammar. Syntax errors always include the offending token and its position in the file.| Error | Cause | Example |
|---|---|---|
Unexpected token at top-level | Unknown token outside a function | @foo at file root |
Expected IDENTIFIER | Type keyword not followed by a name | int 42 |
Expected RPAREN | Unclosed function call or for-loop header | foo(1, 2 |
Expected SEMICOLON | Missing ; at end of statement | int x = 5 |
Unexpected end of file | Unclosed { block | Missing closing } |
Unexpected token in primary expression | Invalid token at the start of an expression | int + 3 |
The examples above illustrate the most common triggers for each error. The same error message can be raised in other contexts — always read the position information alongside the message to locate the exact problem.
Deprecated Keyword Errors
The lexer raises these errors immediately when it encounters a deprecated C11 keyword. Compilation stops as soon as the keyword is found, before any further parsing takes place.| Keyword | Error Message |
|---|---|
restrict | Deprecated keyword used! Please remove or replace the keyword. Found 'RESTRICT'. |
_Bool | Deprecated keyword used! Please remove or replace the keyword. Found 'BOOLEAN'. |
Scope Errors
The structurer raises scope errors while building the Callee/Caller/Scope graph. These errors indicate conflicts in how names are declared and used across scopes.| Error | Cause |
|---|---|
Child named X already exists in scope Y | A variable or function named X is declared more than once in scope Y |
Remember that
for loop init declarations create their own child scope. A variable declared in a for init is not visible in the enclosing function scope, but it will conflict with another variable of the same name declared in the same for header.Memory Errors
The simulation pass raises memory errors during static analysis of pointer lifetimes and function call graphs.| Error | Cause |
|---|---|
callee not found | A function call references a callee that was never defined |
Use after autoremove drop | Your code accesses a pointer after its autoremove free point |
Invalid robbery | A robbery target is not a valid autoremove pointer |
Understanding autoremove and robbery
Understanding autoremove and robbery
When you declare a pointer with
autoremove, the simulation pass determines the last point in your code where that pointer is used and inserts a free call there automatically.Use after autoremove drop means you reference the pointer again after that auto-inserted free. To fix this, either extend the pointer’s lifetime by moving the last use later, or switch to manual free.Invalid robbery means you attempted to “rob” (transfer ownership of) a pointer that was not declared with autoremove. Only autoremove pointers can be the target of a robbery operation.File Errors
The compiler raises file errors before compilation begins, when it cannot read the input source.| Error | Cause |
|---|---|
Error: file not found <path> | The source file at <path> does not exist |
Error reading file: <details> | The OS reported a failure while reading the file — check permissions and disk health |
