Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JSON documentation for expression "locals" #383

Merged
merged 1 commit into from
May 31, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/JSON_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ of a parser to access a field in the last valid union instance in the stack.
`valid_union`)
- `left`: the left side of the operation, or `null` if unary operation
- `right`: the right side of the operation
- if `type` is `local`, `value` is an integer representing an index inside an
array of local integral values. This `type` can only be used inside of an
expression, i.e. if this JSON object has a parent whose `type` attribute is
`expression`. The meaning of these "local integral values" depend on the context
in which the parent expression is evaluated. In the case of an expression being
evaluated inside of an action function belonging to a match-action table, the
local integral values correspond to the runtime data available for a given table
entry (see the [actions](#actions) section for more details on runtime data).

For an expression, `left` and `right` will themselves be JSON objects, where the
`value` attribute can be one of `field`, `hexstr`, `header`, `expression`,
Expand Down