Comments (4)
I will change the spec to forbid parsers, controls and packages to be passed as arguments (they can only be passed as constructor arguments). So this program will fail with an error. This should also take care of the problem of the architecture passing parsers as arguments to parsers.
I have checked-in two examples that test passing parsers as arguments, testdata/p4_16_*/parser-arg.p4. The examples and fixes will be part of the next pull request.
from p4c.
Should global variables whose type is a parser, control, or package also be forbidden?
from p4c.
main is such a global instance.
from p4c.
Good point :-)
from p4c.
Related Issues (20)
- `ComputeWriteSet` does not properly maintain the calling context HOT 1
- Error message for missing declaration in for loops is confusing.
- Reduce type checking overhead HOT 5
- Variant error while compiling
- Seeing test failures for several p4c test programs including test err/testdata/p4_16_errors/constructor3_e.p4 HOT 3
- Broken links on P4C docs page on P4Smith HOT 4
- Consider a CI/CD test run for DEBUG p4c build, instead of RELEASE HOT 4
- SourceInfo initializiation is inconsistent. HOT 2
- Compiler Bug: `Could not find type of <Type_Header> ...` on specialized generic struct type HOT 7
- How often we sync p4's pna.p4 with pna repo ? HOT 3
- Can't find `gc_mark.h` during build HOT 4
- Strange `IHasSourceInfo` interface
- Port Katran C application to P4. HOT 4
- bng.p4 is too large to be loaded into the kernel HOT 3
- Elevated memory usage in def-use HOT 2
- If the PSA frame NTK path set to true,the ARP packet will be sent as ipv4 . HOT 3
- Unexpected "Duplicates declaration" error when P4 program contains no duplicate declarations HOT 8
- `MoveInitializers` splits `start` state for parsers that do not need this
- Add mechanism for easily adding tests for command-line options HOT 1
- Error trying to compile 2024-sep-14 p4c source on Ubuntu Linux HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from p4c.