Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Primitive action: meter or execute_meter? #3

Closed
ghost opened this issue Jul 7, 2015 · 1 comment
Closed

Primitive action: meter or execute_meter? #3

ghost opened this issue Jul 7, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 7, 2015

The active P4 spec (1.0.2) defines the primitive action as meter (Table 4 and p41)

The HLIR parser (as well as sample code in P4Factory) uses execute_meter as the primitive action.

Is there a change pending in the spec or does the code here (and examples) need to migrate to 'meter'?

@antoninbas
Copy link
Member

Our P4 parser assumes that 'meter' is actually a keyword in the language, which collided with the action primitive name
We decided to change the primitive name to 'execute_meter' to avoid this issue
To be honest a better parser (i.e. a parser which does not assume that 'meter' is a keyword) would not have required this change. Which is why we are not sure yet about whether to update the spec or write a better parser for the compiler.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant