From fda985868063d6da9eedcf3a39458bbd71479f72 Mon Sep 17 00:00:00 2001 From: Will Hawkins Date: Fri, 27 Mar 2026 03:57:36 -0400 Subject: [PATCH] Update README Signed-off-by: Will Hawkins --- README.md | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index f32997a..4d0c9cc 100644 --- a/README.md +++ b/README.md @@ -12,28 +12,22 @@ Very, very alpha: As an example of what can be parsed and evaluated, here is a fairly complex P4 program from our unit tests: ```P4 +struct Testing { + bool yesno; + int count; +}; parser main_parser() { - state start { - bool where_to = ts.yesno; - string where_from = "here"; - string where_where = "here"; - if (where_to) { - bool where_from = true; - if (where_from) { - where_to = false; - } - } - where_from = "there"; - transition select (where_to) { - false: reject; - true: accept; - }; - } + state start { + Testing ts; + ts.count = 1; + transition select (ts.count) { + 0: accept; + _: reject; + }; + } }; ``` -(assuming hat `ts` is an instance of a `struct` with the boolean-typed field `yesno`) - Please check back often! ### Building