Skip to content

Commit c1b50a0

Browse files
authored
Merge pull request #939 from p4lang/final-v1.2.2-tweaks
Final fixes for v1.2.2 release
2 parents 77059ec + 01f8d37 commit c1b50a0

File tree

1 file changed

+16
-23
lines changed

1 file changed

+16
-23
lines changed

p4-16/spec/P4-16-spec.mdk

+16-23
Original file line numberDiff line numberDiff line change
@@ -5410,6 +5410,7 @@ transitions to that state including:
54105410
- Method calls, which serve several purposes:
54115411
* Invoking functions (e.g., using `verify` to check the validity of data already parsed), and
54125412
* Invoking methods (e.g., extracting data out of packets or computing checksums) and other parsers (see Section [#sec-invoke-subparser]), and
5413+
- Conditional statements,
54135414
- Transitions to other states (discussed in Section [#sec-transition]).
54145415

54155416
The syntax for parser statements is given by the following grammar rules:
@@ -8080,65 +8081,57 @@ The P4 compiler should provide:
80808081
| | | semantics of invalid header stacks; clarified initialization |
80818082
| | | semantics; fixed several small issues in grammar. |
80828083
|-----|-----|-----|
8083-
| 1.2.2 | May 17, 2021 |
8084+
| 1.2.2 | May 17, 2021 | Added support for tuple access, generic structures, additional |
8085+
| | | enumeration types, abstract methods, conditional and empty |
8086+
| | | statements in parsers, additional casts, and 0-width types; |
8087+
| | | clarified semantics of default actions, headers, empty types, and |
8088+
| | | action data; fixed typos and inconsistencies in the grammar. |
80848089
|-----|-----|-----|
80858090

80868091
## Summary of changes made in version 1.2.2
80878092

8088-
* Fixed several typos and inconsistencies in grammar (Section [#sec-grammar]).
8089-
* Clarified that `default_action` is `NoAction` if otherwise unspecified (Section [#sec-tables]).
80908093
* Added support for accessing tuple fields (Section [#sec-tuple-exprs]).
80918094
* Added support for generic structures (Section [#sec-type-spec]).
8092-
* Generalize `switch` statements to allow expressions with integer, `enum`, or `error` types (Section [#sec-switch-stmt]).
8095+
* Added support for integers, `enum`s, and `error`s in `switch` statements (Section [#sec-switch-stmt]).
8096+
* Added support for additional enumeration types (Section [#sec-enum-types]).
8097+
* Added support for abstract methods (Section [#sec-abstract-methods]).
8098+
* Added support for conditional statements and empty statements in parsers (Section [#sec-parser-state-stmt]).
8099+
* Added support for casts from `int` to `bool` (Section [#sec-casts]).
8100+
* Added support for 0-width bitstrings and varbits (Section [#sec-uninitialized-values-and-writing-invalid-headers]).
8101+
* Clarified that `default_action` is `NoAction` if otherwise unspecified (Section [#sec-tables]).
8102+
* Clarified the types of expressions that may be used as indexes for header stacks (Section [#sec-expr-hs]).
80938103
* Clarified representation of Booleans in headers (Section [#sec-header-types]).
80948104
* Clarified representation of empty types (Section [#sec-uninitialized-values-and-writing-invalid-headers]).
80958105
* Clarified that action data can be specified by the control plane, `default_action` table property, or `const entries` table property (Section [#sec-actions]).
8096-
* Added support for additional enumeration types (Section [#sec-enum-types]).
8097-
* Specified the types of expressions that may be used as indexes for header stacks (Section [#sec-expr-hs]).
8098-
* Added description of abstract methods (Section [#sec-abstract-methods]).
8099-
* Added support for conditional statements and empty statements in parsers (Section [#sec-parsers]).
8100-
* Added support for casts from `int` to `bool`.
8101-
* Added support for 0-width bitstrings and varbits (Section [#sec-uninitialized-values-and-writing-invalid-headers]).
8102-
* Eliminated annotations on `const` entries in grammar.
8106+
* Fixed several typos and inconsistencies in grammar (Section [#sec-grammar]).
8107+
* Eliminated annotations on `const` entries in grammar (Section [#sec-grammar]).
81038108

81048109
## Summary of changes made in version 1.2.1
81058110

81068111
* Added structure-value expressions (Section
81078112
[#sec-structure-expressions]).
8108-
81098113
* Added support for default values (Section [#sec-default-values]).
8110-
81118114
* Added support for concatenating signed strings (Section
81128115
[#sec-concatenation]).
8113-
81148116
* Added key-value and list-structured annotations (Section
81158117
[#sec-annotations]).
8116-
81178118
* Added `@pure` and `@noSideEffects` annotations (Section
81188119
[#sec-extern-annotations]).
8119-
81208120
* Added `@noWarn` annotation (Section [#sec-nowarn-anno]).
8121-
81228121
* Generalized typing for masks to allow serializable `enum`s (Section
81238122
[#sec-cubes]).
8124-
81258123
* Restricted the right operands of bit shifts involving
81268124
infinite-precision integers to be constant and positive (Section
81278125
[#sec-varint-ops]).
8128-
81298126
* Clarified copy-out behavior for `return` (Section
81308127
[#sec-return-stmt]) and `exit` (Section [#sec-exit-stmt])
81318128
statements.
8132-
81338129
* Clarified semantics of invalid header stacks (Section
81348130
[#sec-uninitialized-values-and-writing-invalid-headers]).
8135-
81368131
* Clarified initialization semantics (Section [#sec-lvalues] and
81378132
[#sec-calling-convention]), especially for headers and local
81388133
variables.
8139-
81408134
* Clarified evaluation order for table keys (Section [#sec-mau-semantics]).
8141-
81428135
* Fixed grammar to clarify parsing of right shift operator (`>>`),
81438136
allow empty statements in parser (Section [#sec-parser-state-stmt]),
81448137
and eliminate annotations on const entries (Section [#sec-entries]).

0 commit comments

Comments
 (0)