15 Commits

Author SHA1 Message Date
Will Hawkins a7d8fd1304 grammar,compiler: Add Support For Fixed-Width Integers
Continuous Integration / Grammar Tests (push) Successful in 4m13s
Continuous Integration / Library Format Tests (push) Successful in 5m17s
Continuous Integration / Library Tests (push) Failing after 8m34s
Continuous Integration / Cli Tests (push) Failing after 4m40s
Distinguishing between signed and unsigned fixed-width integer
types must still be done.

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-05-18 06:53:22 -04:00
Will Hawkins 74fead1eba grammar: Parse externs
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-04-23 06:07:54 -04:00
Will Hawkins a3a06efdb4 grammar: Make apply statements have block bodies
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-04-20 03:25:07 -04:00
Will Hawkins 95c489ecd7 grammar: Refactor apply Grammar
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-04-20 02:39:33 -04:00
Will Hawkins 6cb28bc873 grammar: Add exit statement
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-04-20 02:27:08 -04:00
Will Hawkins fa1f694d76 grammar: Hide the return keyword in the grammar
And, add a grammar test for the return keyword.

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-04-20 02:25:28 -04:00
Will Hawkins 7cdbee1999 Refactor Parser For Parameter Lists
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-04-02 01:28:27 -04:00
Will Hawkins 7c35b2b6e5 Binary Operators (and Grouping in Expressions)
Add support for <, <=, >, >=, && and ||.

Also, add support for grouping (with ( and )) in expressions.

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-03-23 07:53:41 -04: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 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 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 a2335a01ed Initial Support For If Statements
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-24 06:08:12 -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 bc700509c1 Add Instantations to Grammar
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-02-06 07:45:29 -05:00
Will Hawkins c78afa5418 Flesh Out P4 Grammar
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
2026-01-17 00:02:43 -05:00