Skip to content

Initialize SPICE parser library structure#1

Merged
ShiboSoftwareDev merged 14 commits into
tscircuit:mainfrom
ShiboSoftwareDev:main
May 30, 2026
Merged

Initialize SPICE parser library structure#1
ShiboSoftwareDev merged 14 commits into
tscircuit:mainfrom
ShiboSoftwareDev:main

Conversation

@ShiboSoftwareDev
Copy link
Copy Markdown
Contributor

@ShiboSoftwareDev ShiboSoftwareDev commented May 28, 2026

Scaffolds spicets following the tscircuit parser-library guide with a tokenized parse pipeline, registered class-based SPICE card model, root netlist/library classes, parse functions, deterministic serialization, unknown-card preservation, public exports, README API docs, and focused unit/round-trip fixture tests.

Copy link
Copy Markdown
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think this is correctly bootstrapped- i would not merge this.

You should start with a lot of examples. Don't let AI generate the examples.

Make sure the classes are extremely specific, SpiceElement is a really bad class, likewise with SpiceDirective. See kicadts and our other ts modules

The quality enforcement for these ts parsers must be extremely high!!!

Copy link
Copy Markdown
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh can't do it. This isn't right

Copy link
Copy Markdown
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tokenizer needs to live separately (an equivalent of Sexpr)

@seveibar
Copy link
Copy Markdown
Contributor

A bit scattered, but here's a video review: https://cleanshot.com/share/gF8pp21z

Major takeaway, we need a tokenizer- without a tokenizer you can't really build the classes properly- this is a big learning from kicadts

overall i'm pretty happy with the rate of progress- but if we merge now i think we would not have a good enough foundation to go "all the way"- the tokenizer and the static methods for turning tokenized objects into classes is critical

You also don't have the extremely important/ergonomic registration system! Look at KicadTs's registration system- it is really great

image

@ShiboSoftwareDev ShiboSoftwareDev requested a review from seveibar May 30, 2026 15:56
@ShiboSoftwareDev ShiboSoftwareDev merged commit caeeb48 into tscircuit:main May 30, 2026
@tscircuitbot
Copy link
Copy Markdown


Thank you for your contribution! 🎉

PR Rating: ⭐⭐⭐
Impact: Major

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants