compiler: Add Preprocessor Support
TODO: Test that file names are properly tracked in included files. Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
#include <nested-split-a.p4>
|
||||
#include <nested-split-b.p4>
|
||||
@@ -0,0 +1 @@
|
||||
state start {
|
||||
@@ -0,0 +1,5 @@
|
||||
transition select (false) {
|
||||
true: reject;
|
||||
false: reject;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
parser main_parser() {
|
||||
#include <nested-split-2.p4>
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
#include <testing-split-oneline-a.p4>#include <testing-split-oneline-b.p4>
|
||||
@@ -0,0 +1 @@
|
||||
#include <testing-split-a.p4>
|
||||
@@ -0,0 +1 @@
|
||||
#include <unfound.p4>
|
||||
@@ -0,0 +1 @@
|
||||
#include <testing.p4>
|
||||
@@ -0,0 +1,3 @@
|
||||
parser main_parser() {
|
||||
state start {
|
||||
#include <testing-split-b.p4>
|
||||
@@ -0,0 +1,6 @@
|
||||
transition select (false) {
|
||||
true: reject;
|
||||
false: reject;
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
parser main_parser() {
|
||||
state start {
|
||||
transition
|
||||
@@ -0,0 +1,6 @@
|
||||
select (false) {
|
||||
true: reject;
|
||||
false: reject;
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
parser main_parser() {
|
||||
state start {
|
||||
transition select (false) {
|
||||
true: reject;
|
||||
false: reject;
|
||||
};
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user