Commit Graph

11 Commits

Author SHA1 Message Date
Will Hawkins b9ff228362 Start Rewrite
Continuous Integration / Grammar Tests (push) Successful in 3m54s
Continuous Integration / Library Format Tests (push) Failing after 4m49s
Continuous Integration / Library Tests (push) Successful in 7m40s
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-06-12 06:24:53 -04:00
Will Hawkins 294f76acd4 compiler: Refactor Compiler To Remove Ambiguities
Continuous Integration / Grammar Tests (push) Successful in 39s
Continuous Integration / Library Format Tests (push) Successful in 1m51s
Continuous Integration / Library Tests (push) Failing after 4m44s
There were significant overlaps in the names of data structures
between the compiler and the language that made it necessary
to litter the code with P4Lang.xxxx. This refactor removes that
requirement in most places (Parser is ambiguous wherever TreeSitter
is used -- cannot avoid that!)

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-05-27 12:59:29 -04:00
Will Hawkins e53c32f802 compiler, cli: Support Nice Compilation Error Messages
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-05-22 02:38:47 -04:00
Will Hawkins b3ca30541a cli: Add a Preprocess Mode
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-05-21 22:40:14 -04:00
Will Hawkins 12fa43d9f9 common, codegen: Implement Visitor And Use For CodeGen
Continuous Integration / Grammar Tests (push) Successful in 4m6s
Continuous Integration / Library Format Tests (push) Successful in 5m5s
Continuous Integration / Library Tests (push) Successful in 9m0s
Continuous Integration / Cli Tests (push) Successful in 4m57s
Implement a generic visitor for components of a P4 program and use
it to start P4 code generation (according to the behavioral model).

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-05-15 08:14:24 -04:00
Will Hawkins fccaf1aa92 cli: Initial _real_ Cli Work
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-05-11 08:56:38 -04:00
Will Hawkins ce35761efa Make Formatter Happy
Continuous Integration / Grammar Tests (push) Failing after 2m26s
Continuous Integration / Library Tests (push) Failing after 18s
Continuous Integration / Library Format Tests (push) Failing after 11s
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-05-06 08:09:15 -04:00
Will Hawkins d9133cf6a9 cli: Remove Darwin Dependency
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-05-06 08:02:21 -04:00
Will Hawkins 7a36ca32dd compiler, runtime: Support Formatted Error Messages
Make it possible to output formatted error messages using a
flexible API that includes an ability to specify styles and
formatters.

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-05-04 22:24:28 -04:00
Will Hawkins e4d6daa8fe Make Formatter Happy
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-05-04 11:31:50 -04:00
Will Hawkins 333270deee cli: Add Initial Cli Work
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-05-04 11:31:44 -04:00