Open Issues Need Help
View All on GitHubAI Summary: The parser currently fails to recognize standalone increment (`++`) and decrement (`--`) operators as valid expression statements, although they work correctly within assignments and larger expressions. The fix requires updating the expression statement parsing logic to properly handle these unary operators when used independently.
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)
AI Summary: The issue proposes adding source location information (line number, column, character offset) to AST nodes to improve error reporting and debugging. This involves updating the lexer to track position and the parser to propagate this data to AST node creation.
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)
AI Summary: The lexer currently tokenizes negative numbers (e.g., `-3`) as a single token, which is incorrect. This issue proposes to modify the lexer to separate these into two distinct tokens: the unary minus operator (`-`) and the positive number literal (`3`), enabling the parser to correctly handle unary expressions and operator precedence.
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)
AI Summary: This GitHub issue requests a significant expansion of the Unity test suite, which currently has 47 tests. The goal is to achieve comprehensive coverage for various edge cases, error conditions, and recently implemented features such as logical operators and comparisons, including complex precedence rules and diverse string handling scenarios.
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)
AI Summary: This issue proposes creating a dedicated Semantic Analyzer module to separate type checking and semantic validation from the parser. Currently, the parser mixes syntax and semantic responsibilities, leading to poor error recovery and an inflexible type system. The new module will run after AST generation, improving architecture, error reporting, and extensibility for future type system features.
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)
AI Summary: The current expression parser uses separate functions for each precedence level, which is unscalable and creates maintenance overhead. The proposal is to refactor it to use a precedence climbing algorithm with a single `parseExpression()` function and an operator table, which will simplify adding new operators and consolidate parsing logic.
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)
AI Summary: A string validation test for a missing closing quote at the end of a string literal incorrectly reports both the expected `ERROR_MISSING_QUOTE` and an additional "unknown error". The goal is to debug the `isStringLit()` function or related logic to ensure only the specific `ERROR_MISSING_QUOTE` is reported for this malformed input.
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)
AI Summary: This issue addresses the absence of a boolean data type, which currently prevents the use of logical expressions, comparison results, and boolean variables in control flow conditions. The implementation requires updates to the lexer for `bool`, `true`, `false` tokens, the parser for corresponding AST nodes, and comprehensive testing to ensure correct declaration, assignment, and type safety.
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)
AI Summary: This issue proposes a refactoring of the AST node creation process to improve type safety and reduce repetitive code. It aims to introduce typed node constructors, implement validation for parent-child node type compatibility, and add helper functions for cleaner AST construction, potentially utilizing designated initializers.
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)
AI Summary: This issue proposes a significant overhaul of the current error reporting infrastructure, which is described as limited and basic. The enhancements include expanding error type definitions, implementing comprehensive validation rules, providing detailed error context (like line numbers and positions), and improving error categorization, severity levels, and user-facing messages.
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)
AI Summary: The `splitter()` function has a memory leak because it allocates memory for `Input` structures and token strings without a corresponding cleanup mechanism, leading to memory accumulation in the main program flow. The proposed solution is to implement a `freeInput(Input input)` function to centralize memory deallocation and integrate it consistently across the codebase, particularly in `main.c`.
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)
C compiler. Lexer, parser, type-checker and code generator to x86_64 ( AMD64 AT&T)