Commit Graph

142 Commits

Author SHA1 Message Date
Will Hawkins 0b84951f8b Fix String Interpolation Warning
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-03-07 01:14:13 -05:00
Will Hawkins 0e4262ea33 Remove Extraneous Experimental Flags
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-03-07 01:13:48 -05:00
Will Hawkins 570438b6ba Attempt To Enable Experimental Feature
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-03-07 00:58:47 -05:00
Will Hawkins 19b983653b Attempt To Enable Experimental Feature
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-03-07 00:39:26 -05:00
Will Hawkins cb6881e1a2 Attempt To Enable Experimental Feature
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-03-07 00:38:27 -05:00
Will Hawkins db520fe0a6 Attempt To Enable Experimental Feature
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-03-07 00:30:12 -05:00
Will Hawkins 61865e7cf9 Update CI/CD Workflow
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-03-06 23:56:26 -05:00
Will Hawkins 81b9345c7f Make Formatter Happy
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-03-06 21:40:37 -05:00
Will Hawkins eff19df968 Completely Refactor Execution
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-03-06 21:40:19 -05:00
Will Hawkins f96350f89d Make Formatter Happy
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-03-06 08:03:07 -05:00
Will Hawkins c3b3be77eb Update Compiler To Use Macros
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-03-06 08:02:35 -05:00
Will Hawkins 8ca03cdca5 Add booleanLiteralExpression To Make Compiling Easier
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-03-06 08:01:41 -05:00
Will Hawkins f778ee384e Add NodeType-Checking Macros
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-03-06 07:47:05 -05:00
Will Hawkins 991e20917c P4 Parser States Do Not Have Local Elements
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-03-02 08:32:09 -05:00
Will Hawkins 59d56e7b73 Make Formatter Happy
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-03-02 08:26:37 -05:00
Will Hawkins 6dba17c97a Refactor Parsing -> Compiling
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-03-02 08:25:29 -05:00
Will Hawkins cfe78a9b29 Semicolon Cleanup
1. Semicolons were required in the wrong spot.
2. Make semicolons "invisible" (from the tree-sitter perspective).

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-27 08:23:27 -05:00
Will Hawkins 1495074459 Add UseErrorResult Macro
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-27 08:22:50 -05:00
Will Hawkins 2c5bfc3e1c Start Moving Away From Queries
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-27 06:16:14 -05:00
Will Hawkins 2c7f71dbd4 Make Formatter Happy
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-24 06:10:33 -05:00
Will Hawkins a2335a01ed Initial Support For If Statements
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-24 06:08:12 -05:00
Will Hawkins 3752dd01ab Add Formatting To CI/CD
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-24 01:00:32 -05:00
Will Hawkins 5dbb8d3d60 Make Formatter Happy
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-24 00:44:04 -05:00
Will Hawkins b4c5ce55e1 Remove Debugging Print
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-24 00:30:40 -05:00
Will Hawkins 64a0fe4255 Refactor Parsing/Runtime
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-24 00:28:41 -05:00
Will Hawkins f9353c683e Use Generic Scope for Lexical Scope
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-24 00:28:04 -05:00
Will Hawkins d0d00857ff Generic Scope Type
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-24 00:27:29 -05:00
Will Hawkins d9c8c5aeb0 Refactor Runtime
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-19 22:50:19 -05:00
Will Hawkins 3693bdc02d Start Evaluation
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-10 03:37:57 -05:00
Will Hawkins 0dd5ce4be3 Update README.md 2026-02-06 18:46:07 -05:00
Will Hawkins 5f956fed45 Update README.md
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-06 18:42:33 -05:00
Will Hawkins bb08a350a1 Fix Typo in README.md
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-06 12:07:46 -05:00
Will Hawkins fe01197c25 Swift 6.2.3 Not Available in CI/CD
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-06 07:52:20 -05:00
Will Hawkins dc2849f722 CI/CD On Proper Swift Version
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-06 07:48:23 -05:00
Will Hawkins 90135d7f24 Rename Package to p4rse
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-06 07:48:05 -05:00
Will Hawkins c3fdfb62e8 Refactor Type System
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-06 07:46:18 -05:00
Will Hawkins bc700509c1 Add Instantations to Grammar
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-06 07:45:29 -05:00
Will Hawkins 285ba829cb Add Runtime As Dependency of Parser
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-03 08:51:26 -05:00
Will Hawkins 37ceb31834 Add README.md
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-03 08:30:49 -05:00
Will Hawkins 989c9b1212 Refactor
Refactor into four major components:

1. Common: Things shared among all other components.
2. Lang: P4-language-related components.
3. Runtime: Components required to run a P4 program.
4. Parser: Components for parsing a P4 program from source.

Other components:

1. Macros
2. Tests
3. TreeSitterExtensions: Extra tree sitter functionality

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-03 08:22:58 -05:00
Will Hawkins 1203c0c90a Improve Parsing of P4 Parsers And Continue Runtime Implementation
1. Parsing of P4 Parsers was broken: Multiple local elements and
statements were not allowed.
2. Support more functionality on scopes.
3. Refactor variable/identifier.
4. Add more tests.

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-01-30 08:33:40 -05:00
Will Hawkins 9b307bcd66 Customize swift-format Configuration
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-01-30 08:33:40 -05:00
Will Hawkins 23b775bf4f Conditionally Support CustomStringConvertible on Result
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-01-30 08:33:40 -05:00
Will Hawkins 27332870d9 Factor Tree-Sitter Extensions
Don't build.

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-01-30 08:33:40 -05:00
Will Hawkins 78a1121a3c Add Testing Macros
Don't build.

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-01-30 08:33:32 -05:00
Will Hawkins d8f6ff3b0b Update Variable Declarations
Refactor a literal '=' to a production and allow expressions
of string-literal type.

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-01-30 08:24:44 -05:00
Will Hawkins 4c5b75bb4f Remove Extraneous CustomStringConvertible
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-01-23 23:54:28 -05:00
Will Hawkins 995abcc470 Add License Information
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-01-23 23:51:49 -05:00
Will Hawkins d6d5cc8df7 Runtime Work
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-01-23 23:30:28 -05:00
Will Hawkins f9ed3e7fbd Support (One) Local Element
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-01-23 23:29:38 -05:00