-
Notifications
You must be signed in to change notification settings - Fork 1
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
optionally ignore stderr in p4test #1
Conversation
I just fixed key-name, it had an incorrect #include. |
testdata/p4_16_errors/key-name.p4
Outdated
@@ -34,4 +34,5 @@ control compute(inout hdr h) { | |||
} | |||
} | |||
|
|||
/* P4TEST_IGNORE_STDERR */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer needed if you pull my last outstanding PR; the include path should be ../p4_16_samples/arith-inline-skeleton.p4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you merge my change into your branch, I'll then squash&merge pull the changes into master.
07b8df5
to
28beeac
Compare
The main refactoring taking place in this PR is to port the P4-14 and P4-16 lexers and parsers to use the C++ modes of Flex and Bison. In C++ mode, Flex generates a lexer that reads from a `std::istream` object instead of a file descriptor. That produces a bit of an impedance mismatch, because typically before we parse anything we run it through the C preprocessor via `popen()`, and `popen()` uses C `FILE*`-based I/O rather than iostreams. The C++-11 standard library does not include a `FILE*` wrapper that produces an `std::istream`. If we don't want to write and maintain one ourselves (and I'd argue we don't) that leaves us with three options: 1. Stop using `popen()` and implement the subset of C preprocessor features we need directly. 2. Read the entire file in and wrap it in a `std::stringstream` or similar. This obviously isn't as efficient as it could be. 3. Use Boost's IOStreams library to do the job more efficiently. In the large term, my view is that #1 is the best choice, but in the short run p4lang#3 seems like a win with no real downsides other than adding another dependency. (It's only an additional dependency on Ubuntu, which splits Boost into a number of small packages. On macOS there's actually no change.) In the interest of getting this PR landed ASAP, I've actually implemented both #2 and p4lang#3, so the Boost IOStreams dependency is optional. I would vastly prefer to make it mandatory, though.
…statement (p4lang#2836) * Fix dpdk regression failure: Duplicates declaration * Fix cpplint errors * Added checks to ensure parameters exist before accessing them * Fix PSA extern Register's implementation 1) Add missing regarray declarations 2) Fix read() method implementation * Updated spec.cpp as per review comments * Emit a warning if Register instantiation is found outside control block * Fixed a typo * Remove restriction for instantiation and invocation of register extern objects and methods in/from control blocks only * Conditional operator support for P4C-DPDK. - Disabled Midend predication pass to allow conditional operator to be splitted into if-else statement - Added a new test and reference output for conditional operator * Changing ternary match to exact in test program, updating the reference output * Added support for range and mask operations in transition select statement. Fixed few typos * Support mask operations in dpdk backend (#1) * Remove pass for inserting temporary mask variables * update reference output * Address review comments * DPDK backend: Add support for tuple expressions in transition select statement * Address review comments for tuple expression support * Use refmap to create label names, use ERR_UNSUPPORTED_ON_TARGET for a few errors * Update test files to include core.p4
No description provided.