Skip to content

Consolidate and Complete IDL Parser #3

@Kinflou

Description

@Kinflou

Consolidate and Complete IDL Parser

Priority

P0 (Critical) - Blocks all downstream development

Labels

  • core
  • parser
  • breaking-change
  • P0

Estimated Effort

2 weeks

Description

The codebase currently has three different parser implementations (pest, lalrpop, chumsky) for the .ids schema files. This creates maintenance overhead and the LALRPOP generated code conflicts with strict linting.

We need to:

  1. Benchmark all three approaches
  2. Choose the best one for production
  3. Complete the chosen parser
  4. Remove the alternatives

Current State

Location: core/src/schema/idl/parser/

Three parser implementations exist:

  • pest/ - Pest grammar-based parser
  • lalrpop/ - LALR parser generator
  • cstree/ - Concrete syntax tree approach

TODO References

  • lib.rs:1 - LALRPOP clashes with deny(rust_2018_idioms)
  • parser/cstree/mod.rs:24,30 - Incomplete implementations
  • parser/pest/parser.rs:344 - TODO placeholder

Acceptance Criteria

  • Only one parser implementation remains in core/src/schema/idl/parser/
  • All example .ids files parse successfully
  • Parser has comprehensive error messages using ariadne
  • All grammar rules from documentation are implemented
  • Parser benchmarks show acceptable performance (<100ms for typical schemas)
  • No TODO items remain in parser code

Tasks

  • Create benchmark suite comparing all three parsers
  • Document decision rationale in ADR (Architecture Decision Record)
  • Complete chosen parser implementation
  • Remove deprecated parsers
  • Update imports throughout codebase
  • Add parser tests for all schema features (struct, enum, protocol, etc.)
  • Update documentation with parser architecture

Dependencies

None - this is a foundational task

Blocks

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Priority 0 - Criticalbreaking-changeBreaking API changecoreCore system componentparserIDL parser

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions