diff --git a/backends/bmv2/run-bmv2-test.py b/backends/bmv2/run-bmv2-test.py index 26159d520b2..5dced44f998 100755 --- a/backends/bmv2/run-bmv2-test.py +++ b/backends/bmv2/run-bmv2-test.py @@ -1,17 +1,9 @@ #!/usr/bin/env python3 + +# SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. # Copyright 2013-present Barefoot Networks, Inc. # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 # Runs the compiler on a sample P4 program generating code for the BMv2 # behavioral model simulator diff --git a/backends/ebpf/codeGen.cpp b/backends/ebpf/codeGen.cpp index c6a25d3f6b9..65b8ed0f10d 100644 --- a/backends/ebpf/codeGen.cpp +++ b/backends/ebpf/codeGen.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "codeGen.h" diff --git a/backends/ebpf/codeGen.h b/backends/ebpf/codeGen.h index e6b8f7649ed..2e062d5a0f5 100644 --- a/backends/ebpf/codeGen.h +++ b/backends/ebpf/codeGen.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef BACKENDS_EBPF_CODEGEN_H_ #define BACKENDS_EBPF_CODEGEN_H_ diff --git a/backends/ebpf/ebpfBackend.cpp b/backends/ebpf/ebpfBackend.cpp index 424bb0cc6c8..72f26fdbd76 100644 --- a/backends/ebpf/ebpfBackend.cpp +++ b/backends/ebpf/ebpfBackend.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "ebpfBackend.h" diff --git a/backends/ebpf/ebpfBackend.h b/backends/ebpf/ebpfBackend.h index d37b6a11b83..50d59dcd8ca 100644 --- a/backends/ebpf/ebpfBackend.h +++ b/backends/ebpf/ebpfBackend.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef BACKENDS_EBPF_EBPFBACKEND_H_ #define BACKENDS_EBPF_EBPFBACKEND_H_ diff --git a/backends/ebpf/ebpfControl.cpp b/backends/ebpf/ebpfControl.cpp index 8f78d8e7154..bb14b1124ad 100644 --- a/backends/ebpf/ebpfControl.cpp +++ b/backends/ebpf/ebpfControl.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "ebpfControl.h" diff --git a/backends/ebpf/ebpfControl.h b/backends/ebpf/ebpfControl.h index 13413725723..078417b8e61 100644 --- a/backends/ebpf/ebpfControl.h +++ b/backends/ebpf/ebpfControl.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef BACKENDS_EBPF_EBPFCONTROL_H_ #define BACKENDS_EBPF_EBPFCONTROL_H_ diff --git a/backends/ebpf/ebpfModel.cpp b/backends/ebpf/ebpfModel.cpp index 5d8c3a86575..e7d808cb02e 100644 --- a/backends/ebpf/ebpfModel.cpp +++ b/backends/ebpf/ebpfModel.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "ebpfModel.h" diff --git a/backends/ebpf/ebpfModel.h b/backends/ebpf/ebpfModel.h index 657dbaca811..9dd4b2612bf 100644 --- a/backends/ebpf/ebpfModel.h +++ b/backends/ebpf/ebpfModel.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef BACKENDS_EBPF_EBPFMODEL_H_ #define BACKENDS_EBPF_EBPFMODEL_H_ diff --git a/backends/ebpf/ebpfObject.h b/backends/ebpf/ebpfObject.h index b86efa6bdb0..b1f966b9990 100644 --- a/backends/ebpf/ebpfObject.h +++ b/backends/ebpf/ebpfObject.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef BACKENDS_EBPF_EBPFOBJECT_H_ #define BACKENDS_EBPF_EBPFOBJECT_H_ diff --git a/backends/ebpf/ebpfOptions.cpp b/backends/ebpf/ebpfOptions.cpp index a5b4096f7b8..6ca307c428f 100644 --- a/backends/ebpf/ebpfOptions.cpp +++ b/backends/ebpf/ebpfOptions.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2022 VMware Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// Copyright 2022 VMware Inc. +// SPDX-FileCopyrightText: 2022 VMware, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "ebpfOptions.h" diff --git a/backends/ebpf/ebpfOptions.h b/backends/ebpf/ebpfOptions.h index 09e2bf38894..1f82211d2d5 100644 --- a/backends/ebpf/ebpfOptions.h +++ b/backends/ebpf/ebpfOptions.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef BACKENDS_EBPF_EBPFOPTIONS_H_ #define BACKENDS_EBPF_EBPFOPTIONS_H_ diff --git a/backends/ebpf/ebpfParser.cpp b/backends/ebpf/ebpfParser.cpp index 9183300f7eb..bc18d86bd54 100644 --- a/backends/ebpf/ebpfParser.cpp +++ b/backends/ebpf/ebpfParser.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "ebpfParser.h" diff --git a/backends/ebpf/ebpfParser.h b/backends/ebpf/ebpfParser.h index 7ba1e544a9a..1213cb03ed6 100644 --- a/backends/ebpf/ebpfParser.h +++ b/backends/ebpf/ebpfParser.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef BACKENDS_EBPF_EBPFPARSER_H_ #define BACKENDS_EBPF_EBPFPARSER_H_ diff --git a/backends/ebpf/ebpfTable.cpp b/backends/ebpf/ebpfTable.cpp index 706a4250262..f7d001346eb 100644 --- a/backends/ebpf/ebpfTable.cpp +++ b/backends/ebpf/ebpfTable.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "ebpfTable.h" diff --git a/backends/ebpf/ebpfTable.h b/backends/ebpf/ebpfTable.h index 0a54fec7587..f952bb60098 100644 --- a/backends/ebpf/ebpfTable.h +++ b/backends/ebpf/ebpfTable.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef BACKENDS_EBPF_EBPFTABLE_H_ #define BACKENDS_EBPF_EBPFTABLE_H_ diff --git a/backends/ebpf/ebpfType.cpp b/backends/ebpf/ebpfType.cpp index 12994a6dda7..818fcd851ea 100644 --- a/backends/ebpf/ebpfType.cpp +++ b/backends/ebpf/ebpfType.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "ebpfType.h" diff --git a/backends/ebpf/ebpfType.h b/backends/ebpf/ebpfType.h index 7007de083b9..65d72aa6c5c 100644 --- a/backends/ebpf/ebpfType.h +++ b/backends/ebpf/ebpfType.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef BACKENDS_EBPF_EBPFTYPE_H_ #define BACKENDS_EBPF_EBPFTYPE_H_ diff --git a/backends/ebpf/midend.cpp b/backends/ebpf/midend.cpp index 49e799eb0f9..97934283f4e 100644 --- a/backends/ebpf/midend.cpp +++ b/backends/ebpf/midend.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "midend.h" diff --git a/backends/ebpf/midend.h b/backends/ebpf/midend.h index 91f827cddee..212d142c9b4 100644 --- a/backends/ebpf/midend.h +++ b/backends/ebpf/midend.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef BACKENDS_EBPF_MIDEND_H_ #define BACKENDS_EBPF_MIDEND_H_ diff --git a/backends/ebpf/p4c-ebpf.cpp b/backends/ebpf/p4c-ebpf.cpp index 6b1e38bcbf5..e5acf4a3bec 100644 --- a/backends/ebpf/p4c-ebpf.cpp +++ b/backends/ebpf/p4c-ebpf.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include diff --git a/backends/ebpf/target.cpp b/backends/ebpf/target.cpp index c58926bc33c..ac99abce097 100644 --- a/backends/ebpf/target.cpp +++ b/backends/ebpf/target.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "target.h" diff --git a/backends/ebpf/target.h b/backends/ebpf/target.h index 831a6e1c7b0..1af1f3bc87d 100644 --- a/backends/ebpf/target.h +++ b/backends/ebpf/target.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef BACKENDS_EBPF_TARGET_H_ #define BACKENDS_EBPF_TARGET_H_ diff --git a/bootstrap.sh b/bootstrap.sh index d7f2977b47e..3bb1c8d14cc 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,17 +1,9 @@ #!/bin/bash + +# SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. # Copyright 2013-present Barefoot Networks, Inc. # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 set -e # exit on error diff --git a/frontends/common/constantFolding.cpp b/frontends/common/constantFolding.cpp index 6d920cd985e..7e9056a8408 100644 --- a/frontends/common/constantFolding.cpp +++ b/frontends/common/constantFolding.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "constantFolding.h" diff --git a/frontends/common/constantFolding.h b/frontends/common/constantFolding.h index 37991c9e341..23f7111be58 100644 --- a/frontends/common/constantFolding.h +++ b/frontends/common/constantFolding.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_COMMON_CONSTANTFOLDING_H_ #define FRONTENDS_COMMON_CONSTANTFOLDING_H_ diff --git a/frontends/common/constantParsing.cpp b/frontends/common/constantParsing.cpp index 7a8505c351f..100b64c17ca 100644 --- a/frontends/common/constantParsing.cpp +++ b/frontends/common/constantParsing.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "constantParsing.h" diff --git a/frontends/common/constantParsing.h b/frontends/common/constantParsing.h index fceb1a4fd22..3e47360ee70 100644 --- a/frontends/common/constantParsing.h +++ b/frontends/common/constantParsing.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_COMMON_CONSTANTPARSING_H_ #define FRONTENDS_COMMON_CONSTANTPARSING_H_ diff --git a/frontends/common/model.h b/frontends/common/model.h index c848417e75b..5e415336ce6 100644 --- a/frontends/common/model.h +++ b/frontends/common/model.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_COMMON_MODEL_H_ #define FRONTENDS_COMMON_MODEL_H_ diff --git a/frontends/common/name_gateways.h b/frontends/common/name_gateways.h index 3b14eb90a01..b41c9376e38 100644 --- a/frontends/common/name_gateways.h +++ b/frontends/common/name_gateways.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_COMMON_NAME_GATEWAYS_H_ #define FRONTENDS_COMMON_NAME_GATEWAYS_H_ diff --git a/frontends/common/options.cpp b/frontends/common/options.cpp index a54b89c84de..cee79af4840 100644 --- a/frontends/common/options.cpp +++ b/frontends/common/options.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "options.h" diff --git a/frontends/common/options.h b/frontends/common/options.h index 0c34d02b5b8..0cd106ad8a6 100644 --- a/frontends/common/options.h +++ b/frontends/common/options.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ /* -*-C++-*- */ diff --git a/frontends/common/parseInput.cpp b/frontends/common/parseInput.cpp index 15799b8d1c8..df0c7791118 100644 --- a/frontends/common/parseInput.cpp +++ b/frontends/common/parseInput.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "parseInput.h" diff --git a/frontends/common/parseInput.h b/frontends/common/parseInput.h index 7a1fcf01bd6..35e1973a538 100644 --- a/frontends/common/parseInput.h +++ b/frontends/common/parseInput.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_COMMON_PARSEINPUT_H_ #define FRONTENDS_COMMON_PARSEINPUT_H_ diff --git a/frontends/common/programMap.h b/frontends/common/programMap.h index 85ea0a2835a..81c41f3142a 100644 --- a/frontends/common/programMap.h +++ b/frontends/common/programMap.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_COMMON_PROGRAMMAP_H_ #define FRONTENDS_COMMON_PROGRAMMAP_H_ diff --git a/frontends/common/resolveReferences/referenceMap.cpp b/frontends/common/resolveReferences/referenceMap.cpp index a9ab45663f6..a2d2a74f61a 100644 --- a/frontends/common/resolveReferences/referenceMap.cpp +++ b/frontends/common/resolveReferences/referenceMap.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "referenceMap.h" diff --git a/frontends/common/resolveReferences/referenceMap.h b/frontends/common/resolveReferences/referenceMap.h index 78dad228c58..f41e5102c2e 100644 --- a/frontends/common/resolveReferences/referenceMap.h +++ b/frontends/common/resolveReferences/referenceMap.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_COMMON_RESOLVEREFERENCES_REFERENCEMAP_H_ #define FRONTENDS_COMMON_RESOLVEREFERENCES_REFERENCEMAP_H_ diff --git a/frontends/common/resolveReferences/resolveReferences.cpp b/frontends/common/resolveReferences/resolveReferences.cpp index 77d1c05964b..f7a0ff9f9b7 100644 --- a/frontends/common/resolveReferences/resolveReferences.cpp +++ b/frontends/common/resolveReferences/resolveReferences.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "resolveReferences.h" diff --git a/frontends/common/resolveReferences/resolveReferences.h b/frontends/common/resolveReferences/resolveReferences.h index 3ea238d2a13..738e1abdbdc 100644 --- a/frontends/common/resolveReferences/resolveReferences.h +++ b/frontends/common/resolveReferences/resolveReferences.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_COMMON_RESOLVEREFERENCES_RESOLVEREFERENCES_H_ #define FRONTENDS_COMMON_RESOLVEREFERENCES_RESOLVEREFERENCES_H_ diff --git a/frontends/p4/callGraph.h b/frontends/p4/callGraph.h index 7ddfbf79bde..9b0931a0c21 100644 --- a/frontends/p4/callGraph.h +++ b/frontends/p4/callGraph.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_CALLGRAPH_H_ #define FRONTENDS_P4_CALLGRAPH_H_ diff --git a/frontends/p4/cloner.h b/frontends/p4/cloner.h index bfac6274e9b..a4a28f241c2 100644 --- a/frontends/p4/cloner.h +++ b/frontends/p4/cloner.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_CLONER_H_ #define FRONTENDS_P4_CLONER_H_ diff --git a/frontends/p4/coreLibrary.h b/frontends/p4/coreLibrary.h index de748b91e84..0520eb154d6 100644 --- a/frontends/p4/coreLibrary.h +++ b/frontends/p4/coreLibrary.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_CORELIBRARY_H_ #define FRONTENDS_P4_CORELIBRARY_H_ diff --git a/frontends/p4/createBuiltins.cpp b/frontends/p4/createBuiltins.cpp index 70b66a3eee9..4677c58db44 100644 --- a/frontends/p4/createBuiltins.cpp +++ b/frontends/p4/createBuiltins.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "createBuiltins.h" diff --git a/frontends/p4/createBuiltins.h b/frontends/p4/createBuiltins.h index a317b87c275..f9355c3c8af 100644 --- a/frontends/p4/createBuiltins.h +++ b/frontends/p4/createBuiltins.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_CREATEBUILTINS_H_ #define FRONTENDS_P4_CREATEBUILTINS_H_ diff --git a/frontends/p4/enumInstance.h b/frontends/p4/enumInstance.h index 4b17b969b2b..a2416fe48c4 100644 --- a/frontends/p4/enumInstance.h +++ b/frontends/p4/enumInstance.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_ENUMINSTANCE_H_ #define FRONTENDS_P4_ENUMINSTANCE_H_ diff --git a/frontends/p4/evaluator/evaluator.cpp b/frontends/p4/evaluator/evaluator.cpp index 24fa6c24faf..ceef6e70e7e 100644 --- a/frontends/p4/evaluator/evaluator.cpp +++ b/frontends/p4/evaluator/evaluator.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "evaluator.h" diff --git a/frontends/p4/evaluator/evaluator.h b/frontends/p4/evaluator/evaluator.h index 76ee2b2d245..7e59a65eb78 100644 --- a/frontends/p4/evaluator/evaluator.h +++ b/frontends/p4/evaluator/evaluator.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_EVALUATOR_EVALUATOR_H_ #define FRONTENDS_P4_EVALUATOR_EVALUATOR_H_ diff --git a/frontends/p4/evaluator/substituteParameters.cpp b/frontends/p4/evaluator/substituteParameters.cpp index 3ba1e93f4c0..15dca11a068 100644 --- a/frontends/p4/evaluator/substituteParameters.cpp +++ b/frontends/p4/evaluator/substituteParameters.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "substituteParameters.h" diff --git a/frontends/p4/evaluator/substituteParameters.h b/frontends/p4/evaluator/substituteParameters.h index 1d3059390b4..2bce1339d76 100644 --- a/frontends/p4/evaluator/substituteParameters.h +++ b/frontends/p4/evaluator/substituteParameters.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ /* -*-C++-*- */ diff --git a/frontends/p4/frontend.cpp b/frontends/p4/frontend.cpp index 71b5e08d9de..93160a850cc 100644 --- a/frontends/p4/frontend.cpp +++ b/frontends/p4/frontend.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "frontend.h" diff --git a/frontends/p4/frontend.h b/frontends/p4/frontend.h index a137eac6dbc..cd895e1662b 100644 --- a/frontends/p4/frontend.h +++ b/frontends/p4/frontend.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_FRONTEND_H_ #define FRONTENDS_P4_FRONTEND_H_ diff --git a/frontends/p4/methodInstance.cpp b/frontends/p4/methodInstance.cpp index 193f7ac2a81..063eac80907 100644 --- a/frontends/p4/methodInstance.cpp +++ b/frontends/p4/methodInstance.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "methodInstance.h" diff --git a/frontends/p4/methodInstance.h b/frontends/p4/methodInstance.h index 2ddd0918225..4e2a421a1ed 100644 --- a/frontends/p4/methodInstance.h +++ b/frontends/p4/methodInstance.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_METHODINSTANCE_H_ #define FRONTENDS_P4_METHODINSTANCE_H_ diff --git a/frontends/p4/parameterSubstitution.h b/frontends/p4/parameterSubstitution.h index 399dc74c189..8bcb4dd12e8 100644 --- a/frontends/p4/parameterSubstitution.h +++ b/frontends/p4/parameterSubstitution.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_PARAMETERSUBSTITUTION_H_ #define FRONTENDS_P4_PARAMETERSUBSTITUTION_H_ diff --git a/frontends/p4/reservedWords.cpp b/frontends/p4/reservedWords.cpp index 3ef6a7286cc..00d72b90aa3 100644 --- a/frontends/p4/reservedWords.cpp +++ b/frontends/p4/reservedWords.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "reservedWords.h" diff --git a/frontends/p4/reservedWords.h b/frontends/p4/reservedWords.h index 68b78d43bd5..4d17162d2e0 100644 --- a/frontends/p4/reservedWords.h +++ b/frontends/p4/reservedWords.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_RESERVEDWORDS_H_ #define FRONTENDS_P4_RESERVEDWORDS_H_ diff --git a/frontends/p4/simplify.cpp b/frontends/p4/simplify.cpp index b3dfa58c975..4907783d12a 100644 --- a/frontends/p4/simplify.cpp +++ b/frontends/p4/simplify.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "simplify.h" diff --git a/frontends/p4/simplify.h b/frontends/p4/simplify.h index c6d36dccb4f..3d0b4f20904 100644 --- a/frontends/p4/simplify.h +++ b/frontends/p4/simplify.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_SIMPLIFY_H_ #define FRONTENDS_P4_SIMPLIFY_H_ diff --git a/frontends/p4/strengthReduction.cpp b/frontends/p4/strengthReduction.cpp index 77a8e4d7189..2a038ee3ab7 100644 --- a/frontends/p4/strengthReduction.cpp +++ b/frontends/p4/strengthReduction.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "strengthReduction.h" diff --git a/frontends/p4/strengthReduction.h b/frontends/p4/strengthReduction.h index a43cb17aa87..04264b1d9a0 100644 --- a/frontends/p4/strengthReduction.h +++ b/frontends/p4/strengthReduction.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_STRENGTHREDUCTION_H_ #define FRONTENDS_P4_STRENGTHREDUCTION_H_ diff --git a/frontends/p4/symbol_table.cpp b/frontends/p4/symbol_table.cpp index 888a5bf0a60..daaefdf25b9 100644 --- a/frontends/p4/symbol_table.cpp +++ b/frontends/p4/symbol_table.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "symbol_table.h" diff --git a/frontends/p4/symbol_table.h b/frontends/p4/symbol_table.h index 79d49f4be8e..2b1f8673248 100644 --- a/frontends/p4/symbol_table.h +++ b/frontends/p4/symbol_table.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ /* -*-C++-*- */ diff --git a/frontends/p4/tableApply.cpp b/frontends/p4/tableApply.cpp index 6de79e71a3f..c770138c5ea 100644 --- a/frontends/p4/tableApply.cpp +++ b/frontends/p4/tableApply.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "tableApply.h" diff --git a/frontends/p4/tableApply.h b/frontends/p4/tableApply.h index 15e86551ff3..cd505ac00b8 100644 --- a/frontends/p4/tableApply.h +++ b/frontends/p4/tableApply.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_TABLEAPPLY_H_ #define FRONTENDS_P4_TABLEAPPLY_H_ diff --git a/frontends/p4/toP4/toP4.cpp b/frontends/p4/toP4/toP4.cpp index 9407dc0b92b..f7ea2a8ab03 100644 --- a/frontends/p4/toP4/toP4.cpp +++ b/frontends/p4/toP4/toP4.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "toP4.h" diff --git a/frontends/p4/toP4/toP4.h b/frontends/p4/toP4/toP4.h index fd1a9ad43f0..25d9ae04422 100644 --- a/frontends/p4/toP4/toP4.h +++ b/frontends/p4/toP4/toP4.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_TOP4_TOP4_H_ #define FRONTENDS_P4_TOP4_TOP4_H_ diff --git a/frontends/p4/typeChecking/typeChecker.cpp b/frontends/p4/typeChecking/typeChecker.cpp index 4c3243e977f..37f8f4b50b7 100644 --- a/frontends/p4/typeChecking/typeChecker.cpp +++ b/frontends/p4/typeChecking/typeChecker.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "typeChecker.h" diff --git a/frontends/p4/typeChecking/typeChecker.h b/frontends/p4/typeChecking/typeChecker.h index e271608c093..6c05be62a6f 100644 --- a/frontends/p4/typeChecking/typeChecker.h +++ b/frontends/p4/typeChecking/typeChecker.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_TYPECHECKING_TYPECHECKER_H_ #define FRONTENDS_P4_TYPECHECKING_TYPECHECKER_H_ diff --git a/frontends/p4/typeChecking/typeConstraints.cpp b/frontends/p4/typeChecking/typeConstraints.cpp index 62151166244..d873ff9e586 100644 --- a/frontends/p4/typeChecking/typeConstraints.cpp +++ b/frontends/p4/typeChecking/typeConstraints.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "typeConstraints.h" diff --git a/frontends/p4/typeChecking/typeConstraints.h b/frontends/p4/typeChecking/typeConstraints.h index 7329f2e4143..4a258769a3e 100644 --- a/frontends/p4/typeChecking/typeConstraints.h +++ b/frontends/p4/typeChecking/typeConstraints.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_TYPECHECKING_TYPECONSTRAINTS_H_ #define FRONTENDS_P4_TYPECHECKING_TYPECONSTRAINTS_H_ diff --git a/frontends/p4/typeChecking/typeUnification.cpp b/frontends/p4/typeChecking/typeUnification.cpp index a74409f90fa..eb43af391c3 100644 --- a/frontends/p4/typeChecking/typeUnification.cpp +++ b/frontends/p4/typeChecking/typeUnification.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "typeUnification.h" diff --git a/frontends/p4/typeChecking/typeUnification.h b/frontends/p4/typeChecking/typeUnification.h index 9f454bcb75e..fdbabc69f1c 100644 --- a/frontends/p4/typeChecking/typeUnification.h +++ b/frontends/p4/typeChecking/typeUnification.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_TYPECHECKING_TYPEUNIFICATION_H_ #define FRONTENDS_P4_TYPECHECKING_TYPEUNIFICATION_H_ diff --git a/frontends/p4/unusedDeclarations.cpp b/frontends/p4/unusedDeclarations.cpp index b042619d039..2a6b842d1bc 100644 --- a/frontends/p4/unusedDeclarations.cpp +++ b/frontends/p4/unusedDeclarations.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "unusedDeclarations.h" diff --git a/frontends/p4/unusedDeclarations.h b/frontends/p4/unusedDeclarations.h index 2b4e1d30ada..78d91ec0a2f 100644 --- a/frontends/p4/unusedDeclarations.h +++ b/frontends/p4/unusedDeclarations.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_UNUSEDDECLARATIONS_H_ #define FRONTENDS_P4_UNUSEDDECLARATIONS_H_ diff --git a/frontends/p4/validateParsedProgram.cpp b/frontends/p4/validateParsedProgram.cpp index 02722140236..54dd6aacbec 100644 --- a/frontends/p4/validateParsedProgram.cpp +++ b/frontends/p4/validateParsedProgram.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "validateParsedProgram.h" diff --git a/frontends/p4/validateParsedProgram.h b/frontends/p4/validateParsedProgram.h index 4f90fb2118e..03b15757d40 100644 --- a/frontends/p4/validateParsedProgram.h +++ b/frontends/p4/validateParsedProgram.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FRONTENDS_P4_VALIDATEPARSEDPROGRAM_H_ #define FRONTENDS_P4_VALIDATEPARSEDPROGRAM_H_ diff --git a/ir/configuration.h b/ir/configuration.h index 18c312683cd..ef40c8b59c6 100644 --- a/ir/configuration.h +++ b/ir/configuration.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef IR_CONFIGURATION_H_ #define IR_CONFIGURATION_H_ diff --git a/ir/dbprint-expression.cpp b/ir/dbprint-expression.cpp index 3b41d42fef4..b56f86daebd 100644 --- a/ir/dbprint-expression.cpp +++ b/ir/dbprint-expression.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include diff --git a/ir/dbprint-p4.cpp b/ir/dbprint-p4.cpp index 4d3e42c172c..7de05799c94 100644 --- a/ir/dbprint-p4.cpp +++ b/ir/dbprint-p4.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/ir/dbprint.cpp b/ir/dbprint.cpp index e804c86ef00..cbd81843ebd 100644 --- a/ir/dbprint.cpp +++ b/ir/dbprint.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "dbprint.h" diff --git a/ir/dbprint.h b/ir/dbprint.h index 594bd6a4b1f..8b239489a5b 100644 --- a/ir/dbprint.h +++ b/ir/dbprint.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef IR_DBPRINT_H_ #define IR_DBPRINT_H_ diff --git a/ir/dump.cpp b/ir/dump.cpp index 4d91142b0b2..f79bd583231 100644 --- a/ir/dump.cpp +++ b/ir/dump.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "dump.h" diff --git a/ir/dump.h b/ir/dump.h index ac6bc939e73..4f1ee00532d 100644 --- a/ir/dump.h +++ b/ir/dump.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef IR_DUMP_H_ #define IR_DUMP_H_ diff --git a/ir/expression.cpp b/ir/expression.cpp index 099c33e6f92..0c456c7dafb 100644 --- a/ir/expression.cpp +++ b/ir/expression.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include diff --git a/ir/id.h b/ir/id.h index 3a204f6a905..850914a3955 100644 --- a/ir/id.h +++ b/ir/id.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef IR_ID_H_ #define IR_ID_H_ diff --git a/ir/ir-inline.h b/ir/ir-inline.h index 6262526fbf7..693d59ffd5e 100644 --- a/ir/ir-inline.h +++ b/ir/ir-inline.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef IR_IR_INLINE_H_ #define IR_IR_INLINE_H_ diff --git a/ir/ir-tree-macros.h b/ir/ir-tree-macros.h index 943a867cc66..6bb29a58994 100644 --- a/ir/ir-tree-macros.h +++ b/ir/ir-tree-macros.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef IR_IR_TREE_MACROS_H_ #define IR_IR_TREE_MACROS_H_ diff --git a/ir/ir.cpp b/ir/ir.cpp index b9a8b66c188..1eb0f9a960d 100644 --- a/ir/ir.cpp +++ b/ir/ir.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "ir/ir.h" diff --git a/ir/ir.h b/ir/ir.h index 787d012ee71..ef1dbae16b0 100644 --- a/ir/ir.h +++ b/ir/ir.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef IR_IR_H_ #define IR_IR_H_ diff --git a/ir/namemap.h b/ir/namemap.h index 9fb7bca941a..dbf44bd7489 100644 --- a/ir/namemap.h +++ b/ir/namemap.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef IR_NAMEMAP_H_ #define IR_NAMEMAP_H_ diff --git a/ir/node.cpp b/ir/node.cpp index 089575cfec5..31b2628eb4d 100644 --- a/ir/node.cpp +++ b/ir/node.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 // If you want to use 'raise' below to trace a node creation uncomment the next line // #include diff --git a/ir/node.h b/ir/node.h index 2e25baf5b99..92b3155d901 100644 --- a/ir/node.h +++ b/ir/node.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef IR_NODE_H_ #define IR_NODE_H_ diff --git a/ir/nodemap.h b/ir/nodemap.h index 70b66aa60f4..a38bfb4db59 100644 --- a/ir/nodemap.h +++ b/ir/nodemap.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef IR_NODEMAP_H_ #define IR_NODEMAP_H_ diff --git a/ir/pass_manager.cpp b/ir/pass_manager.cpp index 9e80e52bd6d..a34d627af08 100644 --- a/ir/pass_manager.cpp +++ b/ir/pass_manager.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "pass_manager.h" diff --git a/ir/pass_manager.h b/ir/pass_manager.h index b6d1a110484..2f91d953cf6 100644 --- a/ir/pass_manager.h +++ b/ir/pass_manager.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef IR_PASS_MANAGER_H_ #define IR_PASS_MANAGER_H_ diff --git a/ir/type.cpp b/ir/type.cpp index 2b7e8961048..d80ac20e302 100644 --- a/ir/type.cpp +++ b/ir/type.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/ir/vector.h b/ir/vector.h index 655d579b252..acc8d70a757 100644 --- a/ir/vector.h +++ b/ir/vector.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef IR_VECTOR_H_ #define IR_VECTOR_H_ diff --git a/ir/visitor.cpp b/ir/visitor.cpp index 73b683bd2b2..63ce9b20836 100644 --- a/ir/visitor.cpp +++ b/ir/visitor.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "visitor.h" diff --git a/ir/visitor.h b/ir/visitor.h index c28bd5c352e..366385c39a1 100644 --- a/ir/visitor.h +++ b/ir/visitor.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef IR_VISITOR_H_ #define IR_VISITOR_H_ diff --git a/lib/algorithm.h b/lib/algorithm.h index 03b407d1183..6a16d053c6f 100644 --- a/lib/algorithm.h +++ b/lib/algorithm.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_ALGORITHM_H_ #define LIB_ALGORITHM_H_ diff --git a/lib/bitops.h b/lib/bitops.h index 0d25c2d1075..8ae7f6c3930 100644 --- a/lib/bitops.h +++ b/lib/bitops.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_BITOPS_H_ #define LIB_BITOPS_H_ diff --git a/lib/bitrange.h b/lib/bitrange.h index 7604f4c4efe..710220467b8 100644 --- a/lib/bitrange.h +++ b/lib/bitrange.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_BITRANGE_H_ #define LIB_BITRANGE_H_ diff --git a/lib/bitvec.cpp b/lib/bitvec.cpp index 459178d402b..89c82e7b0d2 100644 --- a/lib/bitvec.cpp +++ b/lib/bitvec.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "bitvec.h" diff --git a/lib/bitvec.h b/lib/bitvec.h index e70bc10e52f..95432ec1143 100644 --- a/lib/bitvec.h +++ b/lib/bitvec.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_BITVEC_H_ #define LIB_BITVEC_H_ diff --git a/lib/crash.cpp b/lib/crash.cpp index 65c3fe596e5..ade4d2f6798 100644 --- a/lib/crash.cpp +++ b/lib/crash.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "crash.h" #include diff --git a/lib/crash.h b/lib/crash.h index 99c4c5a2fe7..77a62ea8134 100644 --- a/lib/crash.h +++ b/lib/crash.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_CRASH_H_ #define LIB_CRASH_H_ diff --git a/lib/cstring.cpp b/lib/cstring.cpp index a2d35dac982..42f93d2106b 100644 --- a/lib/cstring.cpp +++ b/lib/cstring.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "cstring.h" diff --git a/lib/cstring.h b/lib/cstring.h index d8c4a4d04cd..ecede22cf05 100644 --- a/lib/cstring.h +++ b/lib/cstring.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_CSTRING_H_ #define LIB_CSTRING_H_ diff --git a/lib/enumerator.h b/lib/enumerator.h index 1c185779d7e..34365587ff0 100644 --- a/lib/enumerator.h +++ b/lib/enumerator.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ /* -*-c++-*- C#-like enumerator interface */ diff --git a/lib/error.h b/lib/error.h index 9808b009377..1e35b7acc9b 100644 --- a/lib/error.h +++ b/lib/error.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ /* -*-C++-*- */ diff --git a/lib/exceptions.h b/lib/exceptions.h index 17635bfa9e5..1c43e0931ef 100644 --- a/lib/exceptions.h +++ b/lib/exceptions.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ /* -*-c++-*- */ diff --git a/lib/gc.cpp b/lib/gc.cpp index 26be7d9b189..6fc8231c430 100644 --- a/lib/gc.cpp +++ b/lib/gc.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "lib/gc.h" // Some systems (e.g. those with GNU libc) declare posix_memalign with an diff --git a/lib/gc.h b/lib/gc.h index dc69de8d299..b2dd791fca8 100644 --- a/lib/gc.h +++ b/lib/gc.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_GC_H_ #define LIB_GC_H_ diff --git a/lib/hex.cpp b/lib/hex.cpp index 37b32e11e63..d8220fcff68 100644 --- a/lib/hex.cpp +++ b/lib/hex.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "hex.h" diff --git a/lib/hex.h b/lib/hex.h index 939cf55c117..8aeb77c1181 100644 --- a/lib/hex.h +++ b/lib/hex.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_HEX_H_ #define LIB_HEX_H_ diff --git a/lib/indent.cpp b/lib/indent.cpp index c64964ba7b4..d5bfe1381a0 100644 --- a/lib/indent.cpp +++ b/lib/indent.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "config.h" #if HAVE_LIBGC diff --git a/lib/indent.h b/lib/indent.h index 0394825c7f3..d4dad3ef618 100644 --- a/lib/indent.h +++ b/lib/indent.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_INDENT_H_ #define LIB_INDENT_H_ diff --git a/lib/json.cpp b/lib/json.cpp index 9423aaf5a5f..9d7567af757 100644 --- a/lib/json.cpp +++ b/lib/json.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "json.h" diff --git a/lib/json.h b/lib/json.h index ed49c6e20e4..4b200b4cfb1 100644 --- a/lib/json.h +++ b/lib/json.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_JSON_H_ #define LIB_JSON_H_ diff --git a/lib/log.cpp b/lib/log.cpp index 1eea67502e5..75d048f93e2 100644 --- a/lib/log.cpp +++ b/lib/log.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "config.h" #if HAVE_LIBGC diff --git a/lib/log.h b/lib/log.h index d801ad929b8..9aae39c3ed8 100644 --- a/lib/log.h +++ b/lib/log.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_LOG_H_ #define LIB_LOG_H_ diff --git a/lib/ltbitmatrix.h b/lib/ltbitmatrix.h index cc02ab38600..db7b41a9e0d 100644 --- a/lib/ltbitmatrix.h +++ b/lib/ltbitmatrix.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_LTBITMATRIX_H_ #define LIB_LTBITMATRIX_H_ diff --git a/lib/map.h b/lib/map.h index 0954ad967e6..db0390c87b1 100644 --- a/lib/map.h +++ b/lib/map.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_MAP_H_ #define LIB_MAP_H_ diff --git a/lib/match.cpp b/lib/match.cpp index b3fdb6fa365..59d3247200f 100644 --- a/lib/match.cpp +++ b/lib/match.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "match.h" diff --git a/lib/match.h b/lib/match.h index eea7da52774..e9547760384 100644 --- a/lib/match.h +++ b/lib/match.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_MATCH_H_ #define LIB_MATCH_H_ diff --git a/lib/null.h b/lib/null.h index ad78e8b32df..ec63d6dbff6 100644 --- a/lib/null.h +++ b/lib/null.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ /* -*-C++-*- */ diff --git a/lib/nullstream.cpp b/lib/nullstream.cpp index 48a7f3b3f84..1115695fa08 100644 --- a/lib/nullstream.cpp +++ b/lib/nullstream.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "nullstream.h" diff --git a/lib/nullstream.h b/lib/nullstream.h index d46b196c4f7..fee65b331c5 100644 --- a/lib/nullstream.h +++ b/lib/nullstream.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_NULLSTREAM_H_ #define LIB_NULLSTREAM_H_ diff --git a/lib/options.h b/lib/options.h index a887e1596d0..17d3217fa93 100644 --- a/lib/options.h +++ b/lib/options.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_OPTIONS_H_ #define LIB_OPTIONS_H_ diff --git a/lib/ordered_map.h b/lib/ordered_map.h index 88f6680cf99..20424687baf 100644 --- a/lib/ordered_map.h +++ b/lib/ordered_map.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_ORDERED_MAP_H_ #define LIB_ORDERED_MAP_H_ diff --git a/lib/ordered_set.h b/lib/ordered_set.h index 1ee8bd5f5a6..afc9abfc0b9 100644 --- a/lib/ordered_set.h +++ b/lib/ordered_set.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_ORDERED_SET_H_ #define LIB_ORDERED_SET_H_ diff --git a/lib/range.h b/lib/range.h index d515badeec7..944cf6d9cce 100644 --- a/lib/range.h +++ b/lib/range.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_RANGE_H_ #define LIB_RANGE_H_ diff --git a/lib/sourceCodeBuilder.h b/lib/sourceCodeBuilder.h index 8016f674700..aadcb54df33 100644 --- a/lib/sourceCodeBuilder.h +++ b/lib/sourceCodeBuilder.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_SOURCECODEBUILDER_H_ #define LIB_SOURCECODEBUILDER_H_ diff --git a/lib/source_file.cpp b/lib/source_file.cpp index e0551498c9e..84a27c66995 100644 --- a/lib/source_file.cpp +++ b/lib/source_file.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "source_file.h" diff --git a/lib/source_file.h b/lib/source_file.h index 7636ffd2640..f71aa8cae3d 100644 --- a/lib/source_file.h +++ b/lib/source_file.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ /* -*-c++-*- */ diff --git a/lib/stringify.cpp b/lib/stringify.cpp index 4e9119e18e1..b35d1c9e46b 100644 --- a/lib/stringify.cpp +++ b/lib/stringify.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "stringify.h" diff --git a/lib/stringify.h b/lib/stringify.h index d46ad92f41e..7b781434ed0 100644 --- a/lib/stringify.h +++ b/lib/stringify.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ /* -*-c++-*- */ diff --git a/lib/stringref.h b/lib/stringref.h index a47c1a5704c..094a7fd6769 100644 --- a/lib/stringref.h +++ b/lib/stringref.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef LIB_STRINGREF_H_ #define LIB_STRINGREF_H_ diff --git a/midend/actionSynthesis.cpp b/midend/actionSynthesis.cpp index fbdd567f72a..b93ea0b2bc9 100644 --- a/midend/actionSynthesis.cpp +++ b/midend/actionSynthesis.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "actionSynthesis.h" diff --git a/midend/actionSynthesis.h b/midend/actionSynthesis.h index 0242bd4506d..18a24c9ccc5 100644 --- a/midend/actionSynthesis.h +++ b/midend/actionSynthesis.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef MIDEND_ACTIONSYNTHESIS_H_ #define MIDEND_ACTIONSYNTHESIS_H_ diff --git a/midend/removeLeftSlices.cpp b/midend/removeLeftSlices.cpp index c09de20a331..2a8cc9f9363 100644 --- a/midend/removeLeftSlices.cpp +++ b/midend/removeLeftSlices.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "removeLeftSlices.h" diff --git a/midend/removeLeftSlices.h b/midend/removeLeftSlices.h index e7cc90a6972..b4f8e1e81bf 100644 --- a/midend/removeLeftSlices.h +++ b/midend/removeLeftSlices.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef MIDEND_REMOVELEFTSLICES_H_ #define MIDEND_REMOVELEFTSLICES_H_ diff --git a/midend/simplifyKey.cpp b/midend/simplifyKey.cpp index d8b4c5411f7..2d329be346f 100644 --- a/midend/simplifyKey.cpp +++ b/midend/simplifyKey.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// Copyright 2016 VMware, Inc. +// SPDX-FileCopyrightText: 2016 VMware, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "simplifyKey.h" diff --git a/p4include/core.p4 b/p4include/core.p4 index a843dec6556..1d2c03880bf 100644 --- a/p4include/core.p4 +++ b/p4include/core.p4 @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ /* This is the P4-16 core library, which declares some built-in P4 constructs using P4 */ diff --git a/p4include/ebpf_model.p4 b/p4include/ebpf_model.p4 index f9b4e1ef737..1d8a89fcac1 100644 --- a/p4include/ebpf_model.p4 +++ b/p4include/ebpf_model.p4 @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef _EBPF_MODEL_P4_ #define _EBPF_MODEL_P4_ diff --git a/p4include/v1model.p4 b/p4include/v1model.p4 index f285b9669db..5e8c1475057 100644 --- a/p4include/v1model.p4 +++ b/p4include/v1model.p4 @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ /* P4-16 declaration of the P4 v1.0 switch model */ diff --git a/testdata/p4_16_bmv_errors/loop-bmv2.p4 b/testdata/p4_16_bmv_errors/loop-bmv2.p4 index 14ad94be957..c1ae23d68b4 100644 --- a/testdata/p4_16_bmv_errors/loop-bmv2.p4 +++ b/testdata/p4_16_bmv_errors/loop-bmv2.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #include diff --git a/testdata/p4_16_errors/accept_e.p4 b/testdata/p4_16_errors/accept_e.p4 index 73dbce507bb..c3c744e23b8 100644 --- a/testdata/p4_16_errors/accept_e.p4 +++ b/testdata/p4_16_errors/accept_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ parser p() { state accept { // reserved name diff --git a/testdata/p4_16_errors/action-bind.p4 b/testdata/p4_16_errors/action-bind.p4 index e00da8d8ff8..e4d0ac8f1b8 100644 --- a/testdata/p4_16_errors/action-bind.p4 +++ b/testdata/p4_16_errors/action-bind.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ control c(inout bit<32> x) { bit<32> y; action a(inout bit<32> b, bit<32> d) { diff --git a/testdata/p4_16_errors/action-bind1.p4 b/testdata/p4_16_errors/action-bind1.p4 index ac268e6134a..cfe52032633 100644 --- a/testdata/p4_16_errors/action-bind1.p4 +++ b/testdata/p4_16_errors/action-bind1.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ control c(inout bit<32> x) { action a(inout bit<32> b, bit<32> d) { b = d; diff --git a/testdata/p4_16_errors/action-bind2.p4 b/testdata/p4_16_errors/action-bind2.p4 index 958e8edc393..31c3bca4872 100644 --- a/testdata/p4_16_errors/action-bind2.p4 +++ b/testdata/p4_16_errors/action-bind2.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ control c(inout bit<32> x) { action a(inout bit<32> b, bit<32> d) { b = d; diff --git a/testdata/p4_16_errors/action-bind3.p4 b/testdata/p4_16_errors/action-bind3.p4 index 02007ac7d19..9104edb33f2 100644 --- a/testdata/p4_16_errors/action-bind3.p4 +++ b/testdata/p4_16_errors/action-bind3.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ control c(inout bit<32> x) { action a(inout bit<32> b, bit<32> d) { b = d; diff --git a/testdata/p4_16_errors/assign.p4 b/testdata/p4_16_errors/assign.p4 index 07f18d62f7e..cbbb2d402f8 100644 --- a/testdata/p4_16_errors/assign.p4 +++ b/testdata/p4_16_errors/assign.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern E { E(); void call(); } control c() { diff --git a/testdata/p4_16_errors/binary_e.p4 b/testdata/p4_16_errors/binary_e.p4 index 0d292fad934..194f101e6eb 100644 --- a/testdata/p4_16_errors/binary_e.p4 +++ b/testdata/p4_16_errors/binary_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ struct S {} header hdr {} diff --git a/testdata/p4_16_errors/bitExtract_e.p4 b/testdata/p4_16_errors/bitExtract_e.p4 index e8c3f03a1f6..2d7d1293b99 100644 --- a/testdata/p4_16_errors/bitExtract_e.p4 +++ b/testdata/p4_16_errors/bitExtract_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ struct S {} control p() diff --git a/testdata/p4_16_errors/call1_e.p4 b/testdata/p4_16_errors/call1_e.p4 index c3c19171466..6cd02865d41 100644 --- a/testdata/p4_16_errors/call1_e.p4 +++ b/testdata/p4_16_errors/call1_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ struct S { } control p() diff --git a/testdata/p4_16_errors/conditional_e.p4 b/testdata/p4_16_errors/conditional_e.p4 index a662916deba..b9b6ffaecab 100644 --- a/testdata/p4_16_errors/conditional_e.p4 +++ b/testdata/p4_16_errors/conditional_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ control p() { apply { diff --git a/testdata/p4_16_errors/const1_e.p4 b/testdata/p4_16_errors/const1_e.p4 index e06c3a3a7e5..e2523737848 100644 --- a/testdata/p4_16_errors/const1_e.p4 +++ b/testdata/p4_16_errors/const1_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ action p() { bit<32> x; diff --git a/testdata/p4_16_errors/const_e.p4 b/testdata/p4_16_errors/const_e.p4 index 308005ed0bd..313f92bf3e9 100644 --- a/testdata/p4_16_errors/const_e.p4 +++ b/testdata/p4_16_errors/const_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern I { I(); } const I x = I(); // illegal constants of extern types diff --git a/testdata/p4_16_errors/constructor1_e.p4 b/testdata/p4_16_errors/constructor1_e.p4 index efed8860d89..26d2c1b75e7 100644 --- a/testdata/p4_16_errors/constructor1_e.p4 +++ b/testdata/p4_16_errors/constructor1_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern Y { Y(in T arg); // no type parameters allowed in constructor diff --git a/testdata/p4_16_errors/constructor2_e.p4 b/testdata/p4_16_errors/constructor2_e.p4 index 7bd72cff8bb..e6fce462acc 100644 --- a/testdata/p4_16_errors/constructor2_e.p4 +++ b/testdata/p4_16_errors/constructor2_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern Z { m(); // no return type diff --git a/testdata/p4_16_errors/constructor3_e.p4 b/testdata/p4_16_errors/constructor3_e.p4 index 97952f54b5e..70063983544 100644 --- a/testdata/p4_16_errors/constructor3_e.p4 +++ b/testdata/p4_16_errors/constructor3_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ // incorrect arguments passed to constructor extern E { E(bit x); diff --git a/testdata/p4_16_errors/constructor_e.p4 b/testdata/p4_16_errors/constructor_e.p4 index 236e4464d36..fad395af074 100644 --- a/testdata/p4_16_errors/constructor_e.p4 +++ b/testdata/p4_16_errors/constructor_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern X { void X(); // no return type allowed diff --git a/testdata/p4_16_errors/default_action.p4 b/testdata/p4_16_errors/default_action.p4 index ab2d3fc7782..2a46126c20b 100644 --- a/testdata/p4_16_errors/default_action.p4 +++ b/testdata/p4_16_errors/default_action.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ control c() { action a() {} action b() {} diff --git a/testdata/p4_16_errors/default_action1.p4 b/testdata/p4_16_errors/default_action1.p4 index 73c3e6d9197..31265acf818 100644 --- a/testdata/p4_16_errors/default_action1.p4 +++ b/testdata/p4_16_errors/default_action1.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ action b() {} control c() { diff --git a/testdata/p4_16_errors/directionless.p4 b/testdata/p4_16_errors/directionless.p4 index 6b8642b6735..cf9eff94a80 100644 --- a/testdata/p4_16_errors/directionless.p4 +++ b/testdata/p4_16_errors/directionless.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ control p() { action a(bit x0, out bit y0) diff --git a/testdata/p4_16_errors/div.p4 b/testdata/p4_16_errors/div.p4 index e06ff4ab6c8..c70677211d7 100644 --- a/testdata/p4_16_errors/div.p4 +++ b/testdata/p4_16_errors/div.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ action act() { bit<8> a; a = - 8 / -2; diff --git a/testdata/p4_16_errors/div0.p4 b/testdata/p4_16_errors/div0.p4 index 30dd778a5ad..7e145f6f1b4 100644 --- a/testdata/p4_16_errors/div0.p4 +++ b/testdata/p4_16_errors/div0.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ action act() { bit<8> a; a = a / 0; diff --git a/testdata/p4_16_errors/div1.p4 b/testdata/p4_16_errors/div1.p4 index 811d0f7c809..9c269534cbb 100644 --- a/testdata/p4_16_errors/div1.p4 +++ b/testdata/p4_16_errors/div1.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ action act() { bit<8> a; a = a / -1; // not defined for negative numbers diff --git a/testdata/p4_16_errors/dupConst.p4 b/testdata/p4_16_errors/dupConst.p4 index 987d1472094..364193c0258 100644 --- a/testdata/p4_16_errors/dupConst.p4 +++ b/testdata/p4_16_errors/dupConst.p4 @@ -1,17 +1,8 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ const bit<4> a = 1; const bit<4> a = 2; diff --git a/testdata/p4_16_errors/expression_e.p4 b/testdata/p4_16_errors/expression_e.p4 index dd27ec8f7a0..a373cb9d29f 100644 --- a/testdata/p4_16_errors/expression_e.p4 +++ b/testdata/p4_16_errors/expression_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ control p() { apply { diff --git a/testdata/p4_16_errors/function1_e.p4 b/testdata/p4_16_errors/function1_e.p4 index 1522bb68ee0..36f0cba61e8 100644 --- a/testdata/p4_16_errors/function1_e.p4 +++ b/testdata/p4_16_errors/function1_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern void f(out bit x); control p() diff --git a/testdata/p4_16_errors/function_e.p4 b/testdata/p4_16_errors/function_e.p4 index 85d56171be9..119ec217fa3 100644 --- a/testdata/p4_16_errors/function_e.p4 +++ b/testdata/p4_16_errors/function_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern void f(in bit x); extern void g(); diff --git a/testdata/p4_16_errors/functors2_e.p4 b/testdata/p4_16_errors/functors2_e.p4 index 4238a917d5f..1fc4d583f26 100644 --- a/testdata/p4_16_errors/functors2_e.p4 +++ b/testdata/p4_16_errors/functors2_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ control p() { action a() diff --git a/testdata/p4_16_errors/functors3_e.p4 b/testdata/p4_16_errors/functors3_e.p4 index 410638ebfbe..8976cf2b659 100644 --- a/testdata/p4_16_errors/functors3_e.p4 +++ b/testdata/p4_16_errors/functors3_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ struct s {} s() s1; diff --git a/testdata/p4_16_errors/generic1_e.p4 b/testdata/p4_16_errors/generic1_e.p4 index ecaf9826358..787e1a49b8c 100644 --- a/testdata/p4_16_errors/generic1_e.p4 +++ b/testdata/p4_16_errors/generic1_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern If { T id(in T d); diff --git a/testdata/p4_16_errors/globalVar_e.p4 b/testdata/p4_16_errors/globalVar_e.p4 index c3b114a8e17..c8670d98bbd 100644 --- a/testdata/p4_16_errors/globalVar_e.p4 +++ b/testdata/p4_16_errors/globalVar_e.p4 @@ -1,16 +1,7 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ bit x; // cannot have global variables diff --git a/testdata/p4_16_errors/header1_e.p4 b/testdata/p4_16_errors/header1_e.p4 index abecf30d2a6..b5810086fd0 100644 --- a/testdata/p4_16_errors/header1_e.p4 +++ b/testdata/p4_16_errors/header1_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ struct s1 { _ field1; // don't care not allowed in struct diff --git a/testdata/p4_16_errors/header2_e.p4 b/testdata/p4_16_errors/header2_e.p4 index f69d53027b6..8aadc3584e4 100644 --- a/testdata/p4_16_errors/header2_e.p4 +++ b/testdata/p4_16_errors/header2_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ struct s {} header h diff --git a/testdata/p4_16_errors/interface1_e.p4 b/testdata/p4_16_errors/interface1_e.p4 index ef1d6a46832..295e6d8ba79 100644 --- a/testdata/p4_16_errors/interface1_e.p4 +++ b/testdata/p4_16_errors/interface1_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern X { X(); } diff --git a/testdata/p4_16_errors/interface_e.p4 b/testdata/p4_16_errors/interface_e.p4 index 1d7875bc112..7b233f14bb0 100644 --- a/testdata/p4_16_errors/interface_e.p4 +++ b/testdata/p4_16_errors/interface_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern X { } parser p() diff --git a/testdata/p4_16_errors/issue394.p4 b/testdata/p4_16_errors/issue394.p4 index 26e68b65ef0..e3c56f2c10d 100644 --- a/testdata/p4_16_errors/issue394.p4 +++ b/testdata/p4_16_errors/issue394.p4 @@ -1,18 +1,9 @@ /* -Copyright 2017 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2017 VMware, Inc. + * SPDX-FileCopyrightText: 2017 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern C { bool get(); } control X(out bool b) { diff --git a/testdata/p4_16_errors/issue401.p4 b/testdata/p4_16_errors/issue401.p4 index 5f33ccff59b..d74792f7be8 100644 --- a/testdata/p4_16_errors/issue401.p4 +++ b/testdata/p4_16_errors/issue401.p4 @@ -1,18 +1,9 @@ /* -Copyright 2017 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2017 VMware, Inc. + * SPDX-FileCopyrightText: 2017 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #include header h_t { diff --git a/testdata/p4_16_errors/missing_actions.p4 b/testdata/p4_16_errors/missing_actions.p4 index e6ffa7c46c6..26a04e22cba 100644 --- a/testdata/p4_16_errors/missing_actions.p4 +++ b/testdata/p4_16_errors/missing_actions.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #include "core.p4" control c(in bit x) { diff --git a/testdata/p4_16_errors/missing_match.p4 b/testdata/p4_16_errors/missing_match.p4 index 0644f351fa8..84d4c269351 100644 --- a/testdata/p4_16_errors/missing_match.p4 +++ b/testdata/p4_16_errors/missing_match.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #include diff --git a/testdata/p4_16_errors/module_e.p4 b/testdata/p4_16_errors/module_e.p4 index 114d58841ec..9f9657e0a9f 100644 --- a/testdata/p4_16_errors/module_e.p4 +++ b/testdata/p4_16_errors/module_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ parser Filter(out bool filter); package top(Filter f); diff --git a/testdata/p4_16_errors/mux_e.p4 b/testdata/p4_16_errors/mux_e.p4 index 3048cc6b63b..086413ebd09 100644 --- a/testdata/p4_16_errors/mux_e.p4 +++ b/testdata/p4_16_errors/mux_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ control p() { apply { diff --git a/testdata/p4_16_errors/neg.p4 b/testdata/p4_16_errors/neg.p4 index 5f4eea600c7..f21fb875bb0 100644 --- a/testdata/p4_16_errors/neg.p4 +++ b/testdata/p4_16_errors/neg.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ action act() { int<8> a; int<8> b; diff --git a/testdata/p4_16_errors/next.p4 b/testdata/p4_16_errors/next.p4 index f6cf9986856..e81d6d4354a 100644 --- a/testdata/p4_16_errors/next.p4 +++ b/testdata/p4_16_errors/next.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ header h { bit<32> field; } diff --git a/testdata/p4_16_errors/p_e.p4 b/testdata/p4_16_errors/p_e.p4 index dfd608530aa..c6b0a40d62a 100644 --- a/testdata/p4_16_errors/p_e.p4 +++ b/testdata/p4_16_errors/p_e.p4 @@ -1,17 +1,8 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ /* comment */ x diff --git a/testdata/p4_16_errors/param.p4 b/testdata/p4_16_errors/param.p4 index 3c40d768d2f..e378349b44f 100644 --- a/testdata/p4_16_errors/param.p4 +++ b/testdata/p4_16_errors/param.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern E { E(); void call(); diff --git a/testdata/p4_16_errors/persistent_e.p4 b/testdata/p4_16_errors/persistent_e.p4 index f0c59d42ed1..b1ab9eb7974 100644 --- a/testdata/p4_16_errors/persistent_e.p4 +++ b/testdata/p4_16_errors/persistent_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ control p()(bit y) { apply {} diff --git a/testdata/p4_16_errors/range_e.p4 b/testdata/p4_16_errors/range_e.p4 index d0aa071f30d..bde7d6fd719 100644 --- a/testdata/p4_16_errors/range_e.p4 +++ b/testdata/p4_16_errors/range_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ parser p() { state start { diff --git a/testdata/p4_16_errors/scope.p4 b/testdata/p4_16_errors/scope.p4 index 80ef1a3cd9b..974d2be8af9 100644 --- a/testdata/p4_16_errors/scope.p4 +++ b/testdata/p4_16_errors/scope.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern X { X(); bit<8> get(); } control q() { diff --git a/testdata/p4_16_errors/shift_e.p4 b/testdata/p4_16_errors/shift_e.p4 index 24a5f6cd157..8dcb9dc37be 100644 --- a/testdata/p4_16_errors/shift_e.p4 +++ b/testdata/p4_16_errors/shift_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ control p() { apply { diff --git a/testdata/p4_16_errors/signs.p4 b/testdata/p4_16_errors/signs.p4 index 07f64b28328..a8d11c7ef29 100644 --- a/testdata/p4_16_errors/signs.p4 +++ b/testdata/p4_16_errors/signs.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ action a() { bit<8> a = 8w0; int<8> b = 8w0; diff --git a/testdata/p4_16_errors/spec-ex32_e.p4 b/testdata/p4_16_errors/spec-ex32_e.p4 index 73bb0cafe8d..4a09e863e38 100644 --- a/testdata/p4_16_errors/spec-ex32_e.p4 +++ b/testdata/p4_16_errors/spec-ex32_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ header Hdr { varbit<256> data0; diff --git a/testdata/p4_16_errors/stack1_e.p4 b/testdata/p4_16_errors/stack1_e.p4 index 0bf8a714f70..e454c2b80a6 100644 --- a/testdata/p4_16_errors/stack1_e.p4 +++ b/testdata/p4_16_errors/stack1_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ header h {} control p() diff --git a/testdata/p4_16_errors/stack_e.p4 b/testdata/p4_16_errors/stack_e.p4 index e24df9d7503..eddde693d3c 100644 --- a/testdata/p4_16_errors/stack_e.p4 +++ b/testdata/p4_16_errors/stack_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ header h {} struct s {} diff --git a/testdata/p4_16_errors/struct_e.p4 b/testdata/p4_16_errors/struct_e.p4 index b6d76a532a2..52b482a6607 100644 --- a/testdata/p4_16_errors/struct_e.p4 +++ b/testdata/p4_16_errors/struct_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ struct s {} control p() diff --git a/testdata/p4_16_errors/template_e.p4 b/testdata/p4_16_errors/template_e.p4 index 369d0b3838b..f612cbc49c3 100644 --- a/testdata/p4_16_errors/template_e.p4 +++ b/testdata/p4_16_errors/template_e.p4 @@ -1,16 +1,7 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ package S(); diff --git a/testdata/p4_16_errors/type-params_e.p4 b/testdata/p4_16_errors/type-params_e.p4 index 2feaf41fdb4..c137e3c5098 100644 --- a/testdata/p4_16_errors/type-params_e.p4 +++ b/testdata/p4_16_errors/type-params_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ parser p(in T i); package m(p m); diff --git a/testdata/p4_16_errors/typecheck1_e.p4 b/testdata/p4_16_errors/typecheck1_e.p4 index 9bb4e56719f..f5d7f4033b5 100644 --- a/testdata/p4_16_errors/typecheck1_e.p4 +++ b/testdata/p4_16_errors/typecheck1_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ control p() { apply { diff --git a/testdata/p4_16_errors/typecheck_e.p4 b/testdata/p4_16_errors/typecheck_e.p4 index e41ccef246c..0bfe9100225 100644 --- a/testdata/p4_16_errors/typecheck_e.p4 +++ b/testdata/p4_16_errors/typecheck_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern void f(in int<32> d); control p(in T x) diff --git a/testdata/p4_16_errors/underscore1_e.p4 b/testdata/p4_16_errors/underscore1_e.p4 index e670e102018..dfc8e40943b 100644 --- a/testdata/p4_16_errors/underscore1_e.p4 +++ b/testdata/p4_16_errors/underscore1_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ struct s { bit _; // illegal name } diff --git a/testdata/p4_16_errors/underscore2_e.p4 b/testdata/p4_16_errors/underscore2_e.p4 index 8757d85d8cd..a0649260e5f 100644 --- a/testdata/p4_16_errors/underscore2_e.p4 +++ b/testdata/p4_16_errors/underscore2_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ control c() { apply { diff --git a/testdata/p4_16_errors/underscore3_e.p4 b/testdata/p4_16_errors/underscore3_e.p4 index d6277aeb31d..f94dde47373 100644 --- a/testdata/p4_16_errors/underscore3_e.p4 +++ b/testdata/p4_16_errors/underscore3_e.p4 @@ -1,16 +1,7 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ const bit _ = 1; // illegal name diff --git a/testdata/p4_16_errors/underscore_e.p4 b/testdata/p4_16_errors/underscore_e.p4 index 9b40623fcf0..d799e540ca2 100644 --- a/testdata/p4_16_errors/underscore_e.p4 +++ b/testdata/p4_16_errors/underscore_e.p4 @@ -1,16 +1,7 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern void _(in bit x); // illegal name diff --git a/testdata/p4_16_errors/virtual1.p4 b/testdata/p4_16_errors/virtual1.p4 index 53034250449..c3b39d13f46 100644 --- a/testdata/p4_16_errors/virtual1.p4 +++ b/testdata/p4_16_errors/virtual1.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern Virtual { Virtual(); abstract bit<16> f(in bit<16> ix); diff --git a/testdata/p4_16_errors/virtual2.p4 b/testdata/p4_16_errors/virtual2.p4 index d71d7d86e71..1972fea4f75 100644 --- a/testdata/p4_16_errors/virtual2.p4 +++ b/testdata/p4_16_errors/virtual2.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern Virtual { Virtual(); abstract bit<16> f(in bit<16> ix); diff --git a/testdata/p4_16_errors/virtual3.p4 b/testdata/p4_16_errors/virtual3.p4 index 4047cb83016..fc2c3bd8be2 100644 --- a/testdata/p4_16_errors/virtual3.p4 +++ b/testdata/p4_16_errors/virtual3.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern Virtual { Virtual(); abstract bit<16> f(in bit<16> ix); diff --git a/testdata/p4_16_errors/virtual4.p4 b/testdata/p4_16_errors/virtual4.p4 index 961762a889e..2b11773cf5f 100644 --- a/testdata/p4_16_errors/virtual4.p4 +++ b/testdata/p4_16_errors/virtual4.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern Virtual { Virtual(); abstract bit<16> f(in bit<16> ix); diff --git a/testdata/p4_16_errors/virtual5.p4 b/testdata/p4_16_errors/virtual5.p4 index 55c22129185..86caf3482a5 100644 --- a/testdata/p4_16_errors/virtual5.p4 +++ b/testdata/p4_16_errors/virtual5.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern Virtual { Virtual(); abstract bit<16> f(in bit<16> ix); diff --git a/testdata/p4_16_errors/virtual6.p4 b/testdata/p4_16_errors/virtual6.p4 index acdba0a9e70..74a39ba0bdd 100644 --- a/testdata/p4_16_errors/virtual6.p4 +++ b/testdata/p4_16_errors/virtual6.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ extern Virtual { Virtual(); abstract bit<16> f(in bit<16> ix); diff --git a/testdata/p4_16_errors/width1_e.p4 b/testdata/p4_16_errors/width1_e.p4 index 8831987b89a..a8f2a3a10c9 100644 --- a/testdata/p4_16_errors/width1_e.p4 +++ b/testdata/p4_16_errors/width1_e.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ const int<32> c1 = 0xFFFFFFFF; const int<(c1 + c1)> c2 = 0; const int<(-3)> c3 = 0; diff --git a/testdata/p4_16_errors/width_e.p4 b/testdata/p4_16_errors/width_e.p4 index 34480b86c82..eb7eda804bb 100644 --- a/testdata/p4_16_errors/width_e.p4 +++ b/testdata/p4_16_errors/width_e.p4 @@ -1,16 +1,7 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ const bit<12301923123132> tooLarge = 0; diff --git a/testdata/p4_16_errors_outputs/accept_e.p4-stderr b/testdata/p4_16_errors_outputs/accept_e.p4-stderr index 53f39c95b08..fdcbf4c05f2 100644 --- a/testdata/p4_16_errors_outputs/accept_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/accept_e.p4-stderr @@ -1,6 +1,6 @@ -accept_e.p4(18): [--Werror=invalid] error: Invalid parser state: accept should not be implemented, it is built-in +accept_e.p4(9): [--Werror=invalid] error: Invalid parser state: accept should not be implemented, it is built-in state accept { // reserved name ^^^^^^ -accept_e.p4(16): [--Werror=invalid] error: Parser p has no 'start' state +accept_e.p4(7): [--Werror=invalid] error: Parser p has no 'start' state parser p() ^ diff --git a/testdata/p4_16_errors_outputs/action-bind.p4-stderr b/testdata/p4_16_errors_outputs/action-bind.p4-stderr index 250777401f8..92d213ee342 100644 --- a/testdata/p4_16_errors_outputs/action-bind.p4-stderr +++ b/testdata/p4_16_errors_outputs/action-bind.p4-stderr @@ -1,6 +1,6 @@ -action-bind.p4(23): [--Werror=type-error] error: y: argument does not match declaration in actions list: x +action-bind.p4(14): [--Werror=type-error] error: y: argument does not match declaration in actions list: x default_action = a(y, 0); // error: different bound argument ^ -action-bind.p4(22) +action-bind.p4(13) actions = { a(x); } ^ diff --git a/testdata/p4_16_errors_outputs/action-bind1.p4-stderr b/testdata/p4_16_errors_outputs/action-bind1.p4-stderr index 1183b4ee141..93b16c855f3 100644 --- a/testdata/p4_16_errors_outputs/action-bind1.p4-stderr +++ b/testdata/p4_16_errors_outputs/action-bind1.p4-stderr @@ -1,6 +1,6 @@ -action-bind1.p4(22): [--Werror=type-error] error: a(): Parameter b must be bound +action-bind1.p4(13): [--Werror=type-error] error: a(): Parameter b must be bound default_action = a(); // error: too few arguments ^^^ -action-bind1.p4(17) +action-bind1.p4(8) action a(inout bit<32> b, bit<32> d) { ^ diff --git a/testdata/p4_16_errors_outputs/action-bind2.p4-stderr b/testdata/p4_16_errors_outputs/action-bind2.p4-stderr index 7dc5915aaad..e81ce71661a 100644 --- a/testdata/p4_16_errors_outputs/action-bind2.p4-stderr +++ b/testdata/p4_16_errors_outputs/action-bind2.p4-stderr @@ -1,9 +1,9 @@ -action-bind2.p4(21): [--Werror=type-error] error: a(): Parameter b must be bound +action-bind2.p4(12): [--Werror=type-error] error: a(): Parameter b must be bound actions = { a; } // error: not enough arguments ^ -action-bind2.p4(17) +action-bind2.p4(8) action a(inout bit<32> b, bit<32> d) { ^ -action-bind2.p4(22): [--Werror=type-error] error: 0: must be a left-value +action-bind2.p4(13): [--Werror=type-error] error: 0: must be a left-value default_action = a(0); ^ diff --git a/testdata/p4_16_errors_outputs/action-bind3.p4-stderr b/testdata/p4_16_errors_outputs/action-bind3.p4-stderr index 1a1f5beda61..8f480006662 100644 --- a/testdata/p4_16_errors_outputs/action-bind3.p4-stderr +++ b/testdata/p4_16_errors_outputs/action-bind3.p4-stderr @@ -1,9 +1,9 @@ -action-bind3.p4(21): [--Werror=type-error] error: 0: parameter d cannot be bound: it is set by the control plane +action-bind3.p4(12): [--Werror=type-error] error: 0: parameter d cannot be bound: it is set by the control plane actions = { a(x, 0); } // error: too many arguments ^ -action-bind3.p4(17) +action-bind3.p4(8) action a(inout bit<32> b, bit<32> d) { ^ -action-bind3.p4(22): [--Werror=type-error] error: 0: must be a left-value +action-bind3.p4(13): [--Werror=type-error] error: 0: must be a left-value default_action = a(0); ^ diff --git a/testdata/p4_16_errors_outputs/assign.p4-stderr b/testdata/p4_16_errors_outputs/assign.p4-stderr index 0b1c401d525..96e13d7a7d8 100644 --- a/testdata/p4_16_errors_outputs/assign.p4-stderr +++ b/testdata/p4_16_errors_outputs/assign.p4-stderr @@ -1,3 +1,3 @@ -assign.p4(23): [--Werror=type-error] error: Expression e1 cannot be the target of an assignment +assign.p4(14): [--Werror=type-error] error: Expression e1 cannot be the target of an assignment e1 = e2; ^^ diff --git a/testdata/p4_16_errors_outputs/binary_e.p4-stderr b/testdata/p4_16_errors_outputs/binary_e.p4-stderr index cee1a7b34ad..8bf2c615737 100644 --- a/testdata/p4_16_errors_outputs/binary_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/binary_e.p4-stderr @@ -1,18 +1,18 @@ -binary_e.p4(19): [--Wwarn=unused] warning: control 'p' is unused +binary_e.p4(10): [--Wwarn=unused] warning: control 'p' is unused control p() ^ -binary_e.p4(32): [--Werror=type-error] error: Indexing a[2] applied to non-array and non-tuple type int<2> +binary_e.p4(23): [--Werror=type-error] error: Indexing a[2] applied to non-array and non-tuple type int<2> c = a[2]; // not an array ^^^^ -binary_e.p4(33): [--Werror=type-error] error: Array index d must be an integer, but it has type bool +binary_e.p4(24): [--Werror=type-error] error: Array index d must be an integer, but it has type bool c = stack[d]; // indexing with bool ^ -binary_e.p4(35): [--Werror=type-error] error: e & f: Cannot operate on values with different widths 2 and 4 +binary_e.p4(26): [--Werror=type-error] error: e & f: Cannot operate on values with different widths 2 and 4 f = e & f; // different width ^^^^^ -binary_e.p4(38): [--Werror=type-error] error: d < d: not defined on bool and bool +binary_e.p4(29): [--Werror=type-error] error: d < d: not defined on bool and bool d = d < d; // not defined on bool ^^^^^ -binary_e.p4(39): [--Werror=type-error] error: a > c: not defined on int<2> and int<4> +binary_e.p4(30): [--Werror=type-error] error: a > c: not defined on int<2> and int<4> d = a > c; // different width ^^^^^ diff --git a/testdata/p4_16_errors_outputs/bitExtract_e.p4-stderr b/testdata/p4_16_errors_outputs/bitExtract_e.p4-stderr index 06e51fdb223..5074750b78e 100644 --- a/testdata/p4_16_errors_outputs/bitExtract_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/bitExtract_e.p4-stderr @@ -1,21 +1,21 @@ -bitExtract_e.p4(18): [--Wwarn=unused] warning: control 'p' is unused +bitExtract_e.p4(9): [--Wwarn=unused] warning: control 'p' is unused control p() ^ -bitExtract_e.p4(25): [--Wwarn=unused] warning: 'x' is unused +bitExtract_e.p4(16): [--Wwarn=unused] warning: 'x' is unused bit<4> x = s[3:0]; // wrong type for s ^ -bitExtract_e.p4(26): [--Wwarn=unused] warning: 'y' is unused +bitExtract_e.p4(17): [--Wwarn=unused] warning: 'y' is unused bit<8> y = dt[7:0]; // too many bits ^ -bitExtract_e.p4(27): [--Wwarn=unused] warning: 'z' is unused +bitExtract_e.p4(18): [--Wwarn=unused] warning: 'z' is unused bit<4> z = dt[7:4]; // too many bits ^ -bitExtract_e.p4(25): [--Werror=type-error] error: s[3:0]: bit extraction only defined for bit<> types +bitExtract_e.p4(16): [--Werror=type-error] error: s[3:0]: bit extraction only defined for bit<> types bit<4> x = s[3:0]; // wrong type for s ^^^^^^ -bitExtract_e.p4(26): [--Werror=type-error] error: Bit index 7 greater than width 4 +bitExtract_e.p4(17): [--Werror=type-error] error: Bit index 7 greater than width 4 bit<8> y = dt[7:0]; // too many bits ^ -bitExtract_e.p4(27): [--Werror=type-error] error: Bit index 7 greater than width 4 +bitExtract_e.p4(18): [--Werror=type-error] error: Bit index 7 greater than width 4 bit<4> z = dt[7:4]; // too many bits ^ diff --git a/testdata/p4_16_errors_outputs/call1_e.p4-stderr b/testdata/p4_16_errors_outputs/call1_e.p4-stderr index ef24c2039c9..249dd713781 100644 --- a/testdata/p4_16_errors_outputs/call1_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/call1_e.p4-stderr @@ -1,12 +1,12 @@ -call1_e.p4(18): [--Wwarn=unused] warning: control 'p' is unused +call1_e.p4(9): [--Wwarn=unused] warning: control 'p' is unused control p() ^ -call1_e.p4(20): [--Wwarn=unused] warning: 's' is unused +call1_e.p4(11): [--Wwarn=unused] warning: 's' is unused S() s; // structs have no constructors ^ -call1_e.p4(20): [--Werror=type-error] error: s: cannot allocate objects of type struct S +call1_e.p4(11): [--Werror=type-error] error: s: cannot allocate objects of type struct S S() s; // structs have no constructors ^ -call1_e.p4(16) +call1_e.p4(7) struct S { } ^ diff --git a/testdata/p4_16_errors_outputs/conditional_e.p4-stderr b/testdata/p4_16_errors_outputs/conditional_e.p4-stderr index ffc404f61b4..3220cff9c39 100644 --- a/testdata/p4_16_errors_outputs/conditional_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/conditional_e.p4-stderr @@ -1,6 +1,6 @@ -conditional_e.p4(16): [--Wwarn=unused] warning: control 'p' is unused +conditional_e.p4(7): [--Wwarn=unused] warning: control 'p' is unused control p() ^ -conditional_e.p4(21): [--Werror=type-error] error: Condition of IfStatement does not evaluate to a bool but bit<1> +conditional_e.p4(12): [--Werror=type-error] error: Condition of IfStatement does not evaluate to a bool but bit<1> if (b) ; else ; // non-bool condition ^^ diff --git a/testdata/p4_16_errors_outputs/const1_e.p4-stderr b/testdata/p4_16_errors_outputs/const1_e.p4-stderr index b428b6e6eb8..02208e25c33 100644 --- a/testdata/p4_16_errors_outputs/const1_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/const1_e.p4-stderr @@ -1,9 +1,9 @@ -const1_e.p4(16): [--Wwarn=unused] warning: 'p' is unused +const1_e.p4(7): [--Wwarn=unused] warning: 'p' is unused action p() ^ -const1_e.p4(19): [--Werror=invalid] error: 5 + 3: operands have different types: bit<32> and bit<16> +const1_e.p4(10): [--Werror=invalid] error: 5 + 3: operands have different types: bit<32> and bit<16> x = 32w5 + 16w3; ^^^^^^^^^^^ -const1_e.p4(21): [--Werror=invalid] error: 5 / 0: Division by zero +const1_e.p4(12): [--Werror=invalid] error: 5 / 0: Division by zero x = 5 / 0; ^^^^^ diff --git a/testdata/p4_16_errors_outputs/const_e.p4-stderr b/testdata/p4_16_errors_outputs/const_e.p4-stderr index cc118cc9f40..585795900b8 100644 --- a/testdata/p4_16_errors_outputs/const_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/const_e.p4-stderr @@ -1,6 +1,6 @@ -const_e.p4(18): [--Wwarn=unused] warning: 'x' is unused +const_e.p4(9): [--Wwarn=unused] warning: 'x' is unused const I x = I(); // illegal constants of extern types ^ -const_e.p4(18): [--Werror=type-error] error: x: Cannot declare constants of extern types +const_e.p4(9): [--Werror=type-error] error: x: Cannot declare constants of extern types const I x = I(); // illegal constants of extern types ^ diff --git a/testdata/p4_16_errors_outputs/constructor1_e.p4-stderr b/testdata/p4_16_errors_outputs/constructor1_e.p4-stderr index d4550e6552a..1f7af682662 100644 --- a/testdata/p4_16_errors_outputs/constructor1_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/constructor1_e.p4-stderr @@ -1,4 +1,4 @@ -constructor1_e.p4(18):syntax error, unexpected ( +constructor1_e.p4(9):syntax error, unexpected ( Y( ^ [--Werror=overlimit] error: 1 errors encountered, aborting compilation diff --git a/testdata/p4_16_errors_outputs/constructor2_e.p4-stderr b/testdata/p4_16_errors_outputs/constructor2_e.p4-stderr index 06c4d69fb9a..275f6bdfd95 100644 --- a/testdata/p4_16_errors_outputs/constructor2_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/constructor2_e.p4-stderr @@ -1,4 +1,4 @@ -constructor2_e.p4(18):syntax error, unexpected ( +constructor2_e.p4(9):syntax error, unexpected ( m( ^ [--Werror=overlimit] error: 1 errors encountered, aborting compilation diff --git a/testdata/p4_16_errors_outputs/constructor3_e.p4-stderr b/testdata/p4_16_errors_outputs/constructor3_e.p4-stderr index 105d285c102..af6262603e8 100644 --- a/testdata/p4_16_errors_outputs/constructor3_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/constructor3_e.p4-stderr @@ -1,25 +1,25 @@ -constructor3_e.p4(21): [--Wwarn=unused] warning: control 'c' is unused +constructor3_e.p4(12): [--Wwarn=unused] warning: control 'c' is unused control c() { ^ -constructor3_e.p4(22): [--Wwarn=unused] warning: 'e' is unused +constructor3_e.p4(13): [--Wwarn=unused] warning: 'e' is unused E(true) e; ^ -constructor3_e.p4(22): [--Werror=type-error] error: 'e' +constructor3_e.p4(13): [--Werror=type-error] error: 'e' E(true) e; ^ ---- Actual error: Cannot cast implicitly type 'bool' to type 'bit<1>' ---- Originating from: -constructor3_e.p4(22): Type of argument 'true' (bool) does not match type of parameter 'x' (bit<1>) +constructor3_e.p4(13): Type of argument 'true' (bool) does not match type of parameter 'x' (bit<1>) E(true) e; ^^^^ -constructor3_e.p4(18) +constructor3_e.p4(9) E(bit x); ^ ---- Originating from: -constructor3_e.p4(22): Constructor invocation does not match constructor declaration E +constructor3_e.p4(13): Constructor invocation does not match constructor declaration E E(true) e; ^ -constructor3_e.p4(18) +constructor3_e.p4(9) E(bit x); ^ diff --git a/testdata/p4_16_errors_outputs/constructor_e.p4-stderr b/testdata/p4_16_errors_outputs/constructor_e.p4-stderr index 1d710d8f600..875fdb339c1 100644 --- a/testdata/p4_16_errors_outputs/constructor_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/constructor_e.p4-stderr @@ -1,3 +1,3 @@ -constructor_e.p4(18): [--Werror=invalid] error: X: invalid constructor; cannot have a return type. +constructor_e.p4(9): [--Werror=invalid] error: X: invalid constructor; cannot have a return type. void X(); // no return type allowed ^ diff --git a/testdata/p4_16_errors_outputs/default_action.p4-stderr b/testdata/p4_16_errors_outputs/default_action.p4-stderr index 5e7d50c633e..de6cc1083d3 100644 --- a/testdata/p4_16_errors_outputs/default_action.p4-stderr +++ b/testdata/p4_16_errors_outputs/default_action.p4-stderr @@ -1,9 +1,9 @@ -default_action.p4(16): [--Wwarn=unused] warning: control 'c' is unused +default_action.p4(7): [--Wwarn=unused] warning: control 'c' is unused control c() { ^ -default_action.p4(19): [--Wwarn=unused] warning: table 't' is unused +default_action.p4(10): [--Wwarn=unused] warning: table 't' is unused table t { ^ -default_action.p4(21): [--Werror=type-error] error: b() not present in action list +default_action.p4(12): [--Werror=type-error] error: b() not present in action list default_action = b; // not in the list of actions ^ diff --git a/testdata/p4_16_errors_outputs/default_action1.p4-stderr b/testdata/p4_16_errors_outputs/default_action1.p4-stderr index 6245f676dab..fc0afe6dc24 100644 --- a/testdata/p4_16_errors_outputs/default_action1.p4-stderr +++ b/testdata/p4_16_errors_outputs/default_action1.p4-stderr @@ -1,18 +1,18 @@ -default_action1.p4(20): [--Wwarn=shadow] warning: 'b' shadows 'b' +default_action1.p4(11): [--Wwarn=shadow] warning: 'b' shadows 'b' action b() {} ^ -default_action1.p4(16) +default_action1.p4(7) action b() {} ^ -default_action1.p4(18): [--Wwarn=unused] warning: control 'c' is unused +default_action1.p4(9): [--Wwarn=unused] warning: control 'c' is unused control c() { ^ -default_action1.p4(21): [--Wwarn=unused] warning: table 't' is unused +default_action1.p4(12): [--Wwarn=unused] warning: table 't' is unused table t { ^ -default_action1.p4(23): [--Werror=type-error] error: .b() and b refer to different actions +default_action1.p4(14): [--Werror=type-error] error: .b() and b refer to different actions default_action = .b(); // not the same b ^^^^ -default_action1.p4(22) +default_action1.p4(13) actions = { a; b; } ^ diff --git a/testdata/p4_16_errors_outputs/directionless.p4-stderr b/testdata/p4_16_errors_outputs/directionless.p4-stderr index 7410ec9070c..224aec0ed35 100644 --- a/testdata/p4_16_errors_outputs/directionless.p4-stderr +++ b/testdata/p4_16_errors_outputs/directionless.p4-stderr @@ -1,6 +1,6 @@ -directionless.p4(18): [--Werror=type-error] error: y0: direction-less action parameters have to be at the end +directionless.p4(9): [--Werror=type-error] error: y0: direction-less action parameters have to be at the end action a(bit x0, out bit y0) ^^ -directionless.p4(24): [--Werror=type-error] error: y: direction-less action parameters have to be at the end +directionless.p4(15): [--Werror=type-error] error: y: direction-less action parameters have to be at the end action b(bit x, out bit y) ^ diff --git a/testdata/p4_16_errors_outputs/div.p4-stderr b/testdata/p4_16_errors_outputs/div.p4-stderr index 3dbbe1c0cab..89777c999fb 100644 --- a/testdata/p4_16_errors_outputs/div.p4-stderr +++ b/testdata/p4_16_errors_outputs/div.p4-stderr @@ -1,12 +1,12 @@ -div.p4(16): [--Wwarn=unused] warning: 'act' is unused +div.p4(7): [--Wwarn=unused] warning: 'act' is unused action act() { ^^^ -div.p4(18): [--Werror=invalid] error: -8 / -2: Division is not defined for negative numbers +div.p4(9): [--Werror=invalid] error: -8 / -2: Division is not defined for negative numbers a = - 8 / -2; ^^^^^^^^ -div.p4(19): [--Werror=invalid] error: -10 % 2: Modulo is not defined for negative numbers +div.p4(10): [--Werror=invalid] error: -10 % 2: Modulo is not defined for negative numbers a = -10 % 2; ^^^^^^^ -div.p4(20): [--Werror=invalid] error: 10 % -2: Modulo is not defined for negative numbers +div.p4(11): [--Werror=invalid] error: 10 % -2: Modulo is not defined for negative numbers a = 10 % -2; ^^^^^^^ diff --git a/testdata/p4_16_errors_outputs/div0.p4-stderr b/testdata/p4_16_errors_outputs/div0.p4-stderr index f19c3284b56..f9004c548c4 100644 --- a/testdata/p4_16_errors_outputs/div0.p4-stderr +++ b/testdata/p4_16_errors_outputs/div0.p4-stderr @@ -1,15 +1,15 @@ -div0.p4(16): [--Wwarn=unused] warning: 'act' is unused +div0.p4(7): [--Wwarn=unused] warning: 'act' is unused action act() { ^^^ -div0.p4(18): [--Werror=expr] error: a / 0: Division by zero +div0.p4(9): [--Werror=expr] error: a / 0: Division by zero a = a / 0; ^^^^^ -div0.p4(19): [--Werror=expr] error: a % 0: Modulo by zero +div0.p4(10): [--Werror=expr] error: a % 0: Modulo by zero a = a % 0; ^^^^^ -div0.p4(20): [--Werror=expr] error: a / 0: Division by zero +div0.p4(11): [--Werror=expr] error: a / 0: Division by zero a = a / 8w0; ^^^^^^^ -div0.p4(21): [--Werror=expr] error: a % 0: Modulo by zero +div0.p4(12): [--Werror=expr] error: a % 0: Modulo by zero a = a % 8w0; ^^^^^^^ diff --git a/testdata/p4_16_errors_outputs/div1.p4-stderr b/testdata/p4_16_errors_outputs/div1.p4-stderr index 6320b37e928..f3836453105 100644 --- a/testdata/p4_16_errors_outputs/div1.p4-stderr +++ b/testdata/p4_16_errors_outputs/div1.p4-stderr @@ -1,15 +1,15 @@ -div1.p4(16): [--Wwarn=unused] warning: 'act' is unused +div1.p4(7): [--Wwarn=unused] warning: 'act' is unused action act() { ^^^ -div1.p4(18): [--Werror=type-error] error: a / -1: not defined on negative numbers +div1.p4(9): [--Werror=type-error] error: a / -1: not defined on negative numbers a = a / -1; // not defined for negative numbers ^^^^^^ -div1.p4(19): [--Werror=type-error] error: -5 / a: not defined on negative numbers +div1.p4(10): [--Werror=type-error] error: -5 / a: not defined on negative numbers a = -5 / a; ^^^^^^ -div1.p4(20): [--Werror=type-error] error: a % -1: not defined on negative numbers +div1.p4(11): [--Werror=type-error] error: a % -1: not defined on negative numbers a = a % -1; ^^^^^^ -div1.p4(21): [--Werror=type-error] error: -5 % a: not defined on negative numbers +div1.p4(12): [--Werror=type-error] error: -5 % a: not defined on negative numbers a = -5 % a; ^^^^^^ diff --git a/testdata/p4_16_errors_outputs/dupConst.p4-stderr b/testdata/p4_16_errors_outputs/dupConst.p4-stderr index 1831e484e99..78ead944b6c 100644 --- a/testdata/p4_16_errors_outputs/dupConst.p4-stderr +++ b/testdata/p4_16_errors_outputs/dupConst.p4-stderr @@ -1,6 +1,6 @@ -dupConst.p4(17): [--Werror=duplicate] error: a duplicates a. +dupConst.p4(8): [--Werror=duplicate] error: a duplicates a. const bit<4> a = 2; ^ -dupConst.p4(16) +dupConst.p4(7) const bit<4> a = 1; ^ diff --git a/testdata/p4_16_errors_outputs/expression_e.p4-stderr b/testdata/p4_16_errors_outputs/expression_e.p4-stderr index 11115d1c8c6..74b21d066f0 100644 --- a/testdata/p4_16_errors_outputs/expression_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/expression_e.p4-stderr @@ -1,4 +1,4 @@ -expression_e.p4(21):syntax error, unexpected _ +expression_e.p4(12):syntax error, unexpected _ b = 32w0 & _ ^ [--Werror=overlimit] error: 1 errors encountered, aborting compilation diff --git a/testdata/p4_16_errors_outputs/function1_e.p4-stderr b/testdata/p4_16_errors_outputs/function1_e.p4-stderr index ca2e01aaf2c..674150945b5 100644 --- a/testdata/p4_16_errors_outputs/function1_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/function1_e.p4-stderr @@ -1,20 +1,20 @@ -function1_e.p4(18): [--Wwarn=unused] warning: control 'p' is unused +function1_e.p4(9): [--Wwarn=unused] warning: control 'p' is unused control p() ^ -function1_e.p4(21): [--Werror=type-error] error: 'f(1w0)' +function1_e.p4(12): [--Werror=type-error] error: 'f(1w0)' f(1w1 & 1w0); // non lvalue passed to out parameter ^^^^^^^^^^^^ ---- Actual error: -function1_e.p4(21): : Read-only value used for out/inout parameter 'x' +function1_e.p4(12): : Read-only value used for out/inout parameter 'x' f(1w1 & 1w0); // non lvalue passed to out parameter ^^^^^^^^^ -function1_e.p4(16) +function1_e.p4(7) extern void f(out bit x); ^ ---- Originating from: -function1_e.p4(16): Function type 'f' does not match invocation type '' +function1_e.p4(7): Function type 'f' does not match invocation type '' extern void f(out bit x); ^ -function1_e.p4(21) +function1_e.p4(12) f(1w1 & 1w0); // non lvalue passed to out parameter ^^^^^^^^^^^^ diff --git a/testdata/p4_16_errors_outputs/function_e.p4-stderr b/testdata/p4_16_errors_outputs/function_e.p4-stderr index bfc3f177d88..73284142df0 100644 --- a/testdata/p4_16_errors_outputs/function_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/function_e.p4-stderr @@ -1,62 +1,62 @@ -function_e.p4(17): [--Wwarn=unused] warning: 'T' is unused +function_e.p4(8): [--Wwarn=unused] warning: 'T' is unused extern void g(); ^ -function_e.p4(19): [--Wwarn=unused] warning: control 'p' is unused +function_e.p4(10): [--Wwarn=unused] warning: control 'p' is unused control p() ^ -function_e.p4(22): [--Werror=type-error] error: 'f()' +function_e.p4(13): [--Werror=type-error] error: 'f()' f(); // not enough arguments ^^^ ---- Actual error: -function_e.p4(16): x: No argument supplied for parameter +function_e.p4(7): x: No argument supplied for parameter extern void f(in bit x); ^ ---- Originating from: -function_e.p4(16): Function type 'f' does not match invocation type '' +function_e.p4(7): Function type 'f' does not match invocation type '' extern void f(in bit x); ^ -function_e.p4(22) +function_e.p4(13) f(); // not enough arguments ^^^ -function_e.p4(23): [--Werror=type-error] error: 'f(1w1, 1w0)' +function_e.p4(14): [--Werror=type-error] error: 'f(1w1, 1w0)' f(1w1, 1w0); // too many arguments ^^^^^^^^^^^ ---- Actual error: -function_e.p4(16): f: 2 arguments supplied while 1 are expected +function_e.p4(7): f: 2 arguments supplied while 1 are expected extern void f(in bit x); ^ ---- Originating from: -function_e.p4(16): Function type 'f' does not match invocation type '' +function_e.p4(7): Function type 'f' does not match invocation type '' extern void f(in bit x); ^ -function_e.p4(23) +function_e.p4(14) f(1w1, 1w0); // too many arguments ^^^^^^^^^^^ -function_e.p4(24): [--Werror=type-error] error: 'f(1w0)' +function_e.p4(15): [--Werror=type-error] error: 'f(1w0)' f(1w0); // too many type arguments ^^^^^^^^^^^ ---- Actual error: -function_e.p4(16): f: 0 type parameters expected, but 1 type arguments supplied +function_e.p4(7): f: 0 type parameters expected, but 1 type arguments supplied extern void f(in bit x); ^ ---- Originating from: -function_e.p4(16): Function type 'f' does not match invocation type '' +function_e.p4(7): Function type 'f' does not match invocation type '' extern void f(in bit x); ^ -function_e.p4(24) +function_e.p4(15) f(1w0); // too many type arguments ^^^^^^^^^^^ -function_e.p4(25): [--Werror=type-error] error: 'g()' +function_e.p4(16): [--Werror=type-error] error: 'g()' g(); // too many type arguments ^^^^^^^^^^^^^ ---- Actual error: -function_e.p4(17): g: 1 type parameters expected, but 2 type arguments supplied +function_e.p4(8): g: 1 type parameters expected, but 2 type arguments supplied extern void g(); ^ ---- Originating from: -function_e.p4(17): Function type 'g' does not match invocation type '' +function_e.p4(8): Function type 'g' does not match invocation type '' extern void g(); ^ -function_e.p4(25) +function_e.p4(16) g(); // too many type arguments ^^^^^^^^^^^^^ diff --git a/testdata/p4_16_errors_outputs/functors2_e.p4-stderr b/testdata/p4_16_errors_outputs/functors2_e.p4-stderr index a557d0e5c5f..1cad477c2f8 100644 --- a/testdata/p4_16_errors_outputs/functors2_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/functors2_e.p4-stderr @@ -1,6 +1,6 @@ -functors2_e.p4(20): [--Werror=unsupported] error: Self-referencing types not supported: 'p' within 'control p' +functors2_e.p4(11): [--Werror=unsupported] error: Self-referencing types not supported: 'p' within 'control p' p.apply(); ^ -functors2_e.p4(16) +functors2_e.p4(7) control p() ^ diff --git a/testdata/p4_16_errors_outputs/functors3_e.p4-stderr b/testdata/p4_16_errors_outputs/functors3_e.p4-stderr index 1445161ca59..3757757dbb9 100644 --- a/testdata/p4_16_errors_outputs/functors3_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/functors3_e.p4-stderr @@ -1,9 +1,9 @@ -functors3_e.p4(18): [--Wwarn=unused] warning: 's1' is unused +functors3_e.p4(9): [--Wwarn=unused] warning: 's1' is unused s() s1; ^^ -functors3_e.p4(18): [--Werror=type-error] error: s1: cannot allocate objects of type struct s +functors3_e.p4(9): [--Werror=type-error] error: s1: cannot allocate objects of type struct s s() s1; ^^ -functors3_e.p4(16) +functors3_e.p4(7) struct s {} ^ diff --git a/testdata/p4_16_errors_outputs/generic1_e.p4-stderr b/testdata/p4_16_errors_outputs/generic1_e.p4-stderr index 69eb590cffe..064a7df0b55 100644 --- a/testdata/p4_16_errors_outputs/generic1_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/generic1_e.p4-stderr @@ -1,27 +1,27 @@ -generic1_e.p4(21): [--Wwarn=unused] warning: control 'p1' is unused +generic1_e.p4(12): [--Wwarn=unused] warning: control 'p1' is unused control p1(If x) // missing type parameter ^^ -generic1_e.p4(26): [--Wwarn=unused] warning: control 'p2' is unused +generic1_e.p4(17): [--Wwarn=unused] warning: control 'p2' is unused control p2(If, int<32>> x) // too many type parameters ^^ -generic1_e.p4(33): [--Wwarn=unused] warning: control 'p' is unused +generic1_e.p4(24): [--Wwarn=unused] warning: control 'p' is unused control p() ^ -generic1_e.p4(36): [--Wwarn=unused] warning: 'x' is unused +generic1_e.p4(27): [--Wwarn=unused] warning: 'x' is unused h x; // no type parameter ^ -generic1_e.p4(21): [--Werror=type-error] error: Type parameters needed for x +generic1_e.p4(12): [--Werror=type-error] error: Type parameters needed for x control p1(If x) // missing type parameter ^ -generic1_e.p4(26): [--Werror=type-error] error: If, int<32>>: Type If has 1 type parameter(s), but it is specialized with 2 +generic1_e.p4(17): [--Werror=type-error] error: If, int<32>>: Type If has 1 type parameter(s), but it is specialized with 2 control p2(If, int<32>> x) // too many type parameters ^^^^^^^^^^^^^^^^^^^^ -generic1_e.p4(16) +generic1_e.p4(7) extern If ^^ -generic1_e.p4(36): [--Werror=type-error] error: h>: Type header h has 0 type parameter(s), but it is specialized with 1 +generic1_e.p4(27): [--Werror=type-error] error: h>: Type header h has 0 type parameter(s), but it is specialized with 1 h x; // no type parameter ^^^^^^ -generic1_e.p4(31) +generic1_e.p4(22) header h {} ^ diff --git a/testdata/p4_16_errors_outputs/globalVar_e.p4-stderr b/testdata/p4_16_errors_outputs/globalVar_e.p4-stderr index d3fae483989..a2c260d7a3f 100644 --- a/testdata/p4_16_errors_outputs/globalVar_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/globalVar_e.p4-stderr @@ -1,4 +1,4 @@ -globalVar_e.p4(16):syntax error, unexpected ;, expecting ( +globalVar_e.p4(7):syntax error, unexpected ;, expecting ( bit x; ^ [--Werror=overlimit] error: 1 errors encountered, aborting compilation diff --git a/testdata/p4_16_errors_outputs/header1_e.p4-stderr b/testdata/p4_16_errors_outputs/header1_e.p4-stderr index 466518ce36b..0ee4be0ce8f 100644 --- a/testdata/p4_16_errors_outputs/header1_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/header1_e.p4-stderr @@ -1,4 +1,4 @@ -header1_e.p4(18):syntax error, unexpected _ +header1_e.p4(9):syntax error, unexpected _ _ ^ [--Werror=overlimit] error: 1 errors encountered, aborting compilation diff --git a/testdata/p4_16_errors_outputs/header2_e.p4-stderr b/testdata/p4_16_errors_outputs/header2_e.p4-stderr index acc10b00b6a..1ecce31d568 100644 --- a/testdata/p4_16_errors_outputs/header2_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/header2_e.p4-stderr @@ -1,21 +1,21 @@ -header2_e.p4(27): [--Werror=type-error] error: Field 'field' of 'struct s1' cannot have type 'parser p' +header2_e.p4(18): [--Werror=type-error] error: Field 'field' of 'struct s1' cannot have type 'parser p' p field; // no functor-typed fields allowed ^^^^^ -header2_e.p4(23) +header2_e.p4(14) parser p(); ^ -header2_e.p4(25): [--Werror=type-error] error: Error while analyzing struct s1 +header2_e.p4(16): [--Werror=type-error] error: Error while analyzing struct s1 struct s1 ^^ -header2_e.p4(32): [--Werror=type-error] error: Field 'field' of 'header_union u' cannot have type 'struct s' +header2_e.p4(23): [--Werror=type-error] error: Field 'field' of 'header_union u' cannot have type 'struct s' s field; // no struct field allowed in header_union ^^^^^ -header2_e.p4(16) +header2_e.p4(7) struct s {} ^ -header2_e.p4(33): [--Werror=type-error] error: Field 'field1' of 'header_union u' cannot have type 'bit<1>' +header2_e.p4(24): [--Werror=type-error] error: Field 'field1' of 'header_union u' cannot have type 'bit<1>' bit field1; // no non-header field allowed in header_union ^^^^^^ -header2_e.p4(30): [--Werror=type-error] error: Error while analyzing header_union u +header2_e.p4(21): [--Werror=type-error] error: Error while analyzing header_union u header_union u ^ diff --git a/testdata/p4_16_errors_outputs/interface1_e.p4-stderr b/testdata/p4_16_errors_outputs/interface1_e.p4-stderr index b3cc0165bae..ddbf7bfbfa5 100644 --- a/testdata/p4_16_errors_outputs/interface1_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/interface1_e.p4-stderr @@ -1,9 +1,9 @@ -interface1_e.p4(20): [--Wwarn=unused] warning: control 'p' is unused +interface1_e.p4(11): [--Wwarn=unused] warning: control 'p' is unused control p() ^ -interface1_e.p4(25): [--Werror=type-error] error: x.f: extern X does not have method matching this call +interface1_e.p4(16): [--Werror=type-error] error: x.f: extern X does not have method matching this call x.f(); ^^^ -interface1_e.p4(16) +interface1_e.p4(7) extern X { ^ diff --git a/testdata/p4_16_errors_outputs/interface_e.p4-stderr b/testdata/p4_16_errors_outputs/interface_e.p4-stderr index e2f8ca0a370..abc3d74e6a2 100644 --- a/testdata/p4_16_errors_outputs/interface_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/interface_e.p4-stderr @@ -1,15 +1,15 @@ -interface_e.p4(16): [--Wwarn=unused] warning: 'T' is unused +interface_e.p4(7): [--Wwarn=unused] warning: 'T' is unused extern X { } ^ -interface_e.p4(18): [--Wwarn=unused] warning: parser 'p' is unused +interface_e.p4(9): [--Wwarn=unused] warning: parser 'p' is unused parser p() ^ -interface_e.p4(21): [--Wwarn=unused] warning: 'x' is unused +interface_e.p4(12): [--Wwarn=unused] warning: 'x' is unused X() x; ^ -interface_e.p4(21): [--Werror=type-error] error: x: type X has no matching constructor +interface_e.p4(12): [--Werror=type-error] error: x: type X has no matching constructor X() x; ^ -interface_e.p4(16) +interface_e.p4(7) extern X { } ^ diff --git a/testdata/p4_16_errors_outputs/issue1557-bmv2.p4-stderr b/testdata/p4_16_errors_outputs/issue1557-bmv2.p4-stderr index e829c623d8d..e4a0a861706 100644 --- a/testdata/p4_16_errors_outputs/issue1557-bmv2.p4-stderr +++ b/testdata/p4_16_errors_outputs/issue1557-bmv2.p4-stderr @@ -7,7 +7,7 @@ issue1557-bmv2.p4(23): [--Wwarn=unused] warning: 'drop' is unused issue1557-bmv2.p4(23): [--Werror=type-error] error: Field drop is not a member of structure struct standard_metadata action drop() { smeta.drop = 1; } ^^^^ -v1model.p4(64) +v1model.p4(55) struct standard_metadata_t { ^^^^^^^^^^^^^^^^^^^ issue1557-bmv2.p4(25): [--Werror=type-error] error: idx: parameter should be assigned in call rewrite() diff --git a/testdata/p4_16_errors_outputs/issue394.p4-stderr b/testdata/p4_16_errors_outputs/issue394.p4-stderr index a2c71f125c6..625694e75c0 100644 --- a/testdata/p4_16_errors_outputs/issue394.p4-stderr +++ b/testdata/p4_16_errors_outputs/issue394.p4-stderr @@ -1,6 +1,6 @@ -issue394.p4(19): [--Werror=type-error] error: c: cannot declare variables of type 'C' (consider using an instantiation) +issue394.p4(10): [--Werror=type-error] error: c: cannot declare variables of type 'C' (consider using an instantiation) C c; ^ -issue394.p4(16) +issue394.p4(7) extern C { bool get(); } ^ diff --git a/testdata/p4_16_errors_outputs/issue401.p4-stderr b/testdata/p4_16_errors_outputs/issue401.p4-stderr index bea1fdf58a7..9c992fca531 100644 --- a/testdata/p4_16_errors_outputs/issue401.p4-stderr +++ b/testdata/p4_16_errors_outputs/issue401.p4-stderr @@ -1,14 +1,14 @@ -issue401.p4(42): [--Wwarn=unused] warning: 'b' is unused +issue401.p4(33): [--Wwarn=unused] warning: 'b' is unused bit<1> b = (bit<1>) { 0 }; ^ -issue401.p4(42): [--Werror=type-error] error: '(bit<1>){ 0 }' +issue401.p4(33): [--Werror=type-error] error: '(bit<1>){ 0 }' bit<1> b = (bit<1>) { 0 }; ^^^^^^^^^^^^^^ ---- Actual error: -issue401.p4(42): Cannot unify type 'tuple' with type 'bit<1>' +issue401.p4(33): Cannot unify type 'tuple' with type 'bit<1>' bit<1> b = (bit<1>) { 0 }; ^^^^^ ---- Originating from: -issue401.p4(42): Cannot cast from 'tuple' to 'bit<1>' +issue401.p4(33): Cannot cast from 'tuple' to 'bit<1>' bit<1> b = (bit<1>) { 0 }; ^^^^^ diff --git a/testdata/p4_16_errors_outputs/issue407-1.p4-stderr b/testdata/p4_16_errors_outputs/issue407-1.p4-stderr index 43917d3653f..073478d05a6 100644 --- a/testdata/p4_16_errors_outputs/issue407-1.p4-stderr +++ b/testdata/p4_16_errors_outputs/issue407-1.p4-stderr @@ -4,7 +4,7 @@ typedef int<32> MySignedInt; issue407-1.p4(38): [--Werror=type-error] error: Field 'x7' of 'header H' cannot have type 'error' error x7; ^^ -core.p4(23) +core.p4(14) error { ^ issue407-1.p4(40): [--Werror=type-error] error: Field 'x9' of 'header H' cannot have type 'myenum1' diff --git a/testdata/p4_16_errors_outputs/issue5296_invalid_version.p4-stderr b/testdata/p4_16_errors_outputs/issue5296_invalid_version.p4-stderr index 5d31dc93096..c153dabcddc 100644 --- a/testdata/p4_16_errors_outputs/issue5296_invalid_version.p4-stderr +++ b/testdata/p4_16_errors_outputs/issue5296_invalid_version.p4-stderr @@ -1,3 +1,3 @@ -v1model.p4(57): [--Werror=expected] error: -6419018: expected v1model version to be a non-negative number +v1model.p4(48): [--Werror=expected] error: -6419018: expected v1model version to be a non-negative number const bit<32> __v1model_version = -6419018; ^^^^^^^^ diff --git a/testdata/p4_16_errors_outputs/issue5296_unknown_version.p4-stderr b/testdata/p4_16_errors_outputs/issue5296_unknown_version.p4-stderr index 96211137667..6c41906454e 100644 --- a/testdata/p4_16_errors_outputs/issue5296_unknown_version.p4-stderr +++ b/testdata/p4_16_errors_outputs/issue5296_unknown_version.p4-stderr @@ -1,3 +1,3 @@ -v1model.p4(57): [--Werror=unknown] error: 20000101: unknown v1model version; initial supported version is 20180101, latest is 20200408 +v1model.p4(48): [--Werror=unknown] error: 20000101: unknown v1model version; initial supported version is 20180101, latest is 20200408 const bit<32> __v1model_version = 20000101; ^^^^^^^^ diff --git a/testdata/p4_16_errors_outputs/issue774-2.p4-stderr b/testdata/p4_16_errors_outputs/issue774-2.p4-stderr index ecd4030b7c5..8206c3a99ee 100644 --- a/testdata/p4_16_errors_outputs/issue774-2.p4-stderr +++ b/testdata/p4_16_errors_outputs/issue774-2.p4-stderr @@ -1,6 +1,6 @@ issue774-2.p4(17): [--Werror=type-error] error: b.extract(DefaultExpression): could not infer a type for variable T b.extract(_); ^^^^^^^^^^^^ -core.p4(38) +core.p4(29) void extract(out T hdr); ^ diff --git a/testdata/p4_16_errors_outputs/missing_actions.p4-stderr b/testdata/p4_16_errors_outputs/missing_actions.p4-stderr index 44c47a7a8fc..1af43aa1707 100644 --- a/testdata/p4_16_errors_outputs/missing_actions.p4-stderr +++ b/testdata/p4_16_errors_outputs/missing_actions.p4-stderr @@ -1,3 +1,3 @@ -missing_actions.p4(19): [--Werror=expected] error: t: expected 'actions' property +missing_actions.p4(10): [--Werror=expected] error: t: expected 'actions' property table t { ^ diff --git a/testdata/p4_16_errors_outputs/missing_match.p4-stderr b/testdata/p4_16_errors_outputs/missing_match.p4-stderr index 58aecfb5868..4f0c08d236d 100644 --- a/testdata/p4_16_errors_outputs/missing_match.p4-stderr +++ b/testdata/p4_16_errors_outputs/missing_match.p4-stderr @@ -1,3 +1,3 @@ -missing_match.p4(21): [--Werror=not-found] error: noSuchMatch: declaration not found +missing_match.p4(12): [--Werror=not-found] error: noSuchMatch: declaration not found key = { b : noSuchMatch; } ^^^^^^^^^^^ diff --git a/testdata/p4_16_errors_outputs/module_e.p4-stderr b/testdata/p4_16_errors_outputs/module_e.p4-stderr index d45eec931e4..79ccb48a399 100644 --- a/testdata/p4_16_errors_outputs/module_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/module_e.p4-stderr @@ -1,27 +1,27 @@ -module_e.p4(18): [--Werror=type-error] error: 'package top' +module_e.p4(9): [--Werror=type-error] error: 'package top' package top(Filter f); ^^^ ---- Actual error: -module_e.p4(20): Cannot unify 'in' parameter 'x' with 'out' parameter 'filter' because they have different directions +module_e.p4(11): Cannot unify 'in' parameter 'x' with 'out' parameter 'filter' because they have different directions parser g(in bit x) // mismatch in direction ^ -module_e.p4(16) +module_e.p4(7) parser Filter(out bool filter); ^^^^^^ ---- Originating from: -module_e.p4(25): Type of argument 'g' (parser g) does not match type of parameter 'f' (parser Filter) +module_e.p4(16): Type of argument 'g' (parser g) does not match type of parameter 'f' (parser Filter) top(g()) main; ^^^ -module_e.p4(20) +module_e.p4(11) parser g(in bit x) // mismatch in direction ^ -module_e.p4(18) +module_e.p4(9) package top(Filter f); ^ -module_e.p4(16) +module_e.p4(7) parser Filter(out bool filter); ^^^^^^ ---- Originating from: -module_e.p4(25): Constructor invocation '' does not match declaration 'top' +module_e.p4(16): Constructor invocation '' does not match declaration 'top' top(g()) main; ^^^^ diff --git a/testdata/p4_16_errors_outputs/mux_e.p4-stderr b/testdata/p4_16_errors_outputs/mux_e.p4-stderr index 3e03e4502f0..f2ae7a98804 100644 --- a/testdata/p4_16_errors_outputs/mux_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/mux_e.p4-stderr @@ -1,15 +1,15 @@ -mux_e.p4(16): [--Wwarn=unused] warning: control 'p' is unused +mux_e.p4(7): [--Wwarn=unused] warning: control 'p' is unused control p() ^ [--Werror=type-error] error: Selector of ?: must be bool, not bit<1> -mux_e.p4(25): [--Werror=type-error] error: '?:' +mux_e.p4(16): [--Werror=type-error] error: '?:' d = d ? a : d; // wrong types a <-> d ^^^^^^^^^ ---- Actual error: -mux_e.p4(22): Cannot unify type 'bool' with type 'bit<1>' +mux_e.p4(13): Cannot unify type 'bool' with type 'bit<1>' bool d; ^^^^ ---- Originating from: -mux_e.p4(22): The expressions in a ?: conditional have different types 'bit<1>' and 'bool' +mux_e.p4(13): The expressions in a ?: conditional have different types 'bit<1>' and 'bool' bool d; ^^^^ diff --git a/testdata/p4_16_errors_outputs/neg.p4-stderr b/testdata/p4_16_errors_outputs/neg.p4-stderr index aa4695e61a8..d74f0c46195 100644 --- a/testdata/p4_16_errors_outputs/neg.p4-stderr +++ b/testdata/p4_16_errors_outputs/neg.p4-stderr @@ -1,9 +1,9 @@ -neg.p4(16): [--Wwarn=unused] warning: 'act' is unused +neg.p4(7): [--Wwarn=unused] warning: 'act' is unused action act() { ^^^ -neg.p4(21): [--Werror=type-error] error: a / b: Cannot operate on signed values +neg.p4(12): [--Werror=type-error] error: a / b: Cannot operate on signed values c = a / b; // not defined for signed values ^^^^^ -neg.p4(22): [--Werror=type-error] error: a % b: Cannot operate on signed values +neg.p4(13): [--Werror=type-error] error: a % b: Cannot operate on signed values c = a % b; ^^^^^ diff --git a/testdata/p4_16_errors_outputs/next.p4-stderr b/testdata/p4_16_errors_outputs/next.p4-stderr index 5dec1dfb76a..503ce195a1c 100644 --- a/testdata/p4_16_errors_outputs/next.p4-stderr +++ b/testdata/p4_16_errors_outputs/next.p4-stderr @@ -1,6 +1,6 @@ -next.p4(20): [--Wwarn=unused] warning: control 'c' is unused +next.p4(11): [--Wwarn=unused] warning: control 'c' is unused control c() { ^ -next.p4(24): [--Werror=type-error] error: stack.last: 'last', and 'next' for stacks can only be used in a parser +next.p4(15): [--Werror=type-error] error: stack.last: 'last', and 'next' for stacks can only be used in a parser stack.last = { 10 }; ^^^^^^^^^^ diff --git a/testdata/p4_16_errors_outputs/p_e.p4-stderr b/testdata/p4_16_errors_outputs/p_e.p4-stderr index f784022d30f..954ea7450a2 100644 --- a/testdata/p4_16_errors_outputs/p_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/p_e.p4-stderr @@ -1,4 +1,4 @@ -p_e.p4(17):syntax error, unexpected END +p_e.p4(8):syntax error, unexpected END x ^ [--Werror=overlimit] error: 1 errors encountered, aborting compilation diff --git a/testdata/p4_16_errors_outputs/param.p4-stderr b/testdata/p4_16_errors_outputs/param.p4-stderr index 93e49de6b9d..42ab65c1cef 100644 --- a/testdata/p4_16_errors_outputs/param.p4-stderr +++ b/testdata/p4_16_errors_outputs/param.p4-stderr @@ -1,3 +1,3 @@ -param.p4(22): [--Werror=type-error] error: E: Action parameters cannot have extern types +param.p4(13): [--Werror=type-error] error: E: Action parameters cannot have extern types action a(E e) { e.call(); } ^ diff --git a/testdata/p4_16_errors_outputs/persistent_e.p4-stderr b/testdata/p4_16_errors_outputs/persistent_e.p4-stderr index 8a85ed8379f..5d61ae29d04 100644 --- a/testdata/p4_16_errors_outputs/persistent_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/persistent_e.p4-stderr @@ -1,3 +1,3 @@ -persistent_e.p4(23): [--Werror=type-error] error: z: cannot evaluate to a compile-time constant +persistent_e.p4(14): [--Werror=type-error] error: z: cannot evaluate to a compile-time constant p(z) p1; // argument is not constant ^ diff --git a/testdata/p4_16_errors_outputs/range_e.p4-stderr b/testdata/p4_16_errors_outputs/range_e.p4-stderr index cb5e3bbb676..ca0a54fc313 100644 --- a/testdata/p4_16_errors_outputs/range_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/range_e.p4-stderr @@ -1,6 +1,6 @@ -range_e.p4(16): [--Wwarn=unused] warning: parser 'p' is unused +range_e.p4(7): [--Wwarn=unused] warning: parser 'p' is unused parser p() ^ -range_e.p4(20): [--Werror=type-error] error: 2 .. 3: Cannot operate on values with different types bit<2> and bit<3> +range_e.p4(11): [--Werror=type-error] error: 2 .. 3: Cannot operate on values with different types bit<2> and bit<3> 2w2 .. 3w3 : reject; // different widths ^^^^^^^^^^ diff --git a/testdata/p4_16_errors_outputs/scope.p4-stderr b/testdata/p4_16_errors_outputs/scope.p4-stderr index c07c717a18e..a9ef62bd62a 100644 --- a/testdata/p4_16_errors_outputs/scope.p4-stderr +++ b/testdata/p4_16_errors_outputs/scope.p4-stderr @@ -1,15 +1,15 @@ -scope.p4(19): [--Wwarn=unused] warning: 'x' is unused +scope.p4(10): [--Wwarn=unused] warning: 'x' is unused X() x; ^ -scope.p4(23): [--Wwarn=unused] warning: control 'r' is unused +scope.p4(14): [--Wwarn=unused] warning: control 'r' is unused control r() { ^ -scope.p4(25): [--Wwarn=unused] warning: 'y' is unused +scope.p4(16): [--Wwarn=unused] warning: 'y' is unused bit<8> y = .q.x.get(); // should be unreachable ^ -scope.p4(25): [--Werror=type-error] error: Cannot extract field x from q which has type Type(control q) +scope.p4(16): [--Werror=type-error] error: Cannot extract field x from q which has type Type(control q) bit<8> y = .q.x.get(); // should be unreachable ^ -scope.p4(25) +scope.p4(16) bit<8> y = .q.x.get(); // should be unreachable ^^ diff --git a/testdata/p4_16_errors_outputs/shift_e.p4-stderr b/testdata/p4_16_errors_outputs/shift_e.p4-stderr index f9a2bf94901..8929c9fa4d3 100644 --- a/testdata/p4_16_errors_outputs/shift_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/shift_e.p4-stderr @@ -1,4 +1,4 @@ -shift_e.p4(20):syntax error, unexpected > +shift_e.p4(11):syntax error, unexpected > int<32> b = a > > ^ [--Werror=overlimit] error: 1 errors encountered, aborting compilation diff --git a/testdata/p4_16_errors_outputs/signs.p4-stderr b/testdata/p4_16_errors_outputs/signs.p4-stderr index 5f75b0978bd..4394a6f0346 100644 --- a/testdata/p4_16_errors_outputs/signs.p4-stderr +++ b/testdata/p4_16_errors_outputs/signs.p4-stderr @@ -1,15 +1,15 @@ -signs.p4(16): [--Wwarn=unused] warning: 'a' is unused +signs.p4(7): [--Wwarn=unused] warning: 'a' is unused action a() { ^ -signs.p4(18): [--Werror=type-error] error: 'b' +signs.p4(9): [--Werror=type-error] error: 'b' int<8> b = 8w0; ^ ---- Actual error: Cannot cast implicitly type 'bit<8>' to type 'int<8>' ---- Originating from: -signs.p4(18): Source expression '8w0' produces a result of type 'bit<8>' which cannot be assigned to a left-value with type 'int<8>' +signs.p4(9): Source expression '8w0' produces a result of type 'bit<8>' which cannot be assigned to a left-value with type 'int<8>' int<8> b = 8w0; ^^^ -signs.p4(19): [--Werror=type-error] error: a - b: Cannot operate on values with different signs +signs.p4(10): [--Werror=type-error] error: a - b: Cannot operate on values with different signs a = a - b; ^^^^^ diff --git a/testdata/p4_16_errors_outputs/spec-ex32_e.p4-stderr b/testdata/p4_16_errors_outputs/spec-ex32_e.p4-stderr index 5c816e7c6fb..e5b7d2f88d3 100644 --- a/testdata/p4_16_errors_outputs/spec-ex32_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/spec-ex32_e.p4-stderr @@ -1,3 +1,3 @@ -spec-ex32_e.p4(22): [--Werror=not-found] error: size2: declaration not found +spec-ex32_e.p4(13): [--Werror=not-found] error: size2: declaration not found @length(size2) // illegal: cannot use size2, defined after data2 ^^^^^ diff --git a/testdata/p4_16_errors_outputs/stack1_e.p4-stderr b/testdata/p4_16_errors_outputs/stack1_e.p4-stderr index 779a0a9bed1..2f187b0b695 100644 --- a/testdata/p4_16_errors_outputs/stack1_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/stack1_e.p4-stderr @@ -1,12 +1,12 @@ -stack1_e.p4(18): [--Wwarn=unused] warning: control 'p' is unused +stack1_e.p4(9): [--Wwarn=unused] warning: control 'p' is unused control p() ^ -stack1_e.p4(22): [--Wwarn=unused] warning: 'stack' is unused +stack1_e.p4(13): [--Wwarn=unused] warning: 'stack' is unused h[w] stack; ^^^^^ -stack1_e.p4(21): [--Wwarn=overflow] warning: 3s5: signed value does not fit in 3 bits +stack1_e.p4(12): [--Wwarn=overflow] warning: 3s5: signed value does not fit in 3 bits int<3> w = 5; ^ -stack1_e.p4(22): [--Werror=type-error] error: header h[?]: Size of header stack type should be a constant +stack1_e.p4(13): [--Werror=type-error] error: header h[?]: Size of header stack type should be a constant h[w] stack; ^^^^ diff --git a/testdata/p4_16_errors_outputs/stack_e.p4-stderr b/testdata/p4_16_errors_outputs/stack_e.p4-stderr index 2b194d2dd06..9035b2c170f 100644 --- a/testdata/p4_16_errors_outputs/stack_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/stack_e.p4-stderr @@ -1,21 +1,21 @@ -stack_e.p4(19): [--Wwarn=unused] warning: control 'p' is unused +stack_e.p4(10): [--Wwarn=unused] warning: control 'p' is unused control p() ^ -stack_e.p4(26): [--Wwarn=unused] warning: 'b' is unused +stack_e.p4(17): [--Wwarn=unused] warning: 'b' is unused h b = stack[1231092310293]; ^ -stack_e.p4(27): [--Wwarn=unused] warning: 'c' is unused +stack_e.p4(18): [--Wwarn=unused] warning: 'c' is unused h c = stack[-2]; ^ -stack_e.p4(28): [--Wwarn=unused] warning: 'd' is unused +stack_e.p4(19): [--Wwarn=unused] warning: 'd' is unused h d = stack[6]; ^ -stack_e.p4(29): [--Wwarn=unused] warning: 'e' is unused +stack_e.p4(20): [--Wwarn=unused] warning: 'e' is unused s e = stack1.next; ^ -stack_e.p4(26): [--Werror=overlimit] error: 1231092310293: Value too large for int +stack_e.p4(17): [--Werror=overlimit] error: 1231092310293: Value too large for int h b = stack[1231092310293]; ^^^^^^^^^^^^^ -stack_e.p4(29): [--Werror=type-error] error: stack1.next: 'next' can only be used on header stacks +stack_e.p4(20): [--Werror=type-error] error: stack1.next: 'next' can only be used on header stacks s e = stack1.next; ^^^^^^^^^^^ diff --git a/testdata/p4_16_errors_outputs/struct_e.p4-stderr b/testdata/p4_16_errors_outputs/struct_e.p4-stderr index b8a30175188..155dd65f94b 100644 --- a/testdata/p4_16_errors_outputs/struct_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/struct_e.p4-stderr @@ -1,15 +1,15 @@ -struct_e.p4(18): [--Wwarn=unused] warning: control 'p' is unused +struct_e.p4(9): [--Wwarn=unused] warning: control 'p' is unused control p() ^ -struct_e.p4(24): [--Werror=type-error] error: Field data is not a member of structure struct s +struct_e.p4(15): [--Werror=type-error] error: Field data is not a member of structure struct s v.data = 1w0; // no such field ^^^^ -struct_e.p4(16) +struct_e.p4(7) struct s {} ^ -struct_e.p4(25): [--Werror=type-error] error: Cannot extract field data from b which has type bit<1> +struct_e.p4(16): [--Werror=type-error] error: Cannot extract field data from b which has type bit<1> b.data = 5; // no such field ^^^^ -struct_e.p4(25) +struct_e.p4(16) b.data = 5; // no such field ^ diff --git a/testdata/p4_16_errors_outputs/template_e.p4-stderr b/testdata/p4_16_errors_outputs/template_e.p4-stderr index a1e5c305b06..fe0e210afd2 100644 --- a/testdata/p4_16_errors_outputs/template_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/template_e.p4-stderr @@ -1,13 +1,13 @@ -template_e.p4(16): [--Werror=duplicate] error: T: Duplicates declaration T +template_e.p4(7): [--Werror=duplicate] error: T: Duplicates declaration T package S ^ -template_e.p4(16) +template_e.p4(7) package S ^ [--Werror=overlimit] error: 2 errors encountered, aborting compilation diff --git a/testdata/p4_16_errors_outputs/type-params_e.p4-stderr b/testdata/p4_16_errors_outputs/type-params_e.p4-stderr index 6d2b6afb221..2a57fdd893e 100644 --- a/testdata/p4_16_errors_outputs/type-params_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/type-params_e.p4-stderr @@ -1,3 +1,3 @@ -type-params_e.p4(18): [--Werror=not-found] error: D: declaration not found +type-params_e.p4(9): [--Werror=not-found] error: D: declaration not found package m(p m); ^ diff --git a/testdata/p4_16_errors_outputs/typecheck1_e.p4-stderr b/testdata/p4_16_errors_outputs/typecheck1_e.p4-stderr index 39443442475..855b222d4ae 100644 --- a/testdata/p4_16_errors_outputs/typecheck1_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/typecheck1_e.p4-stderr @@ -1,18 +1,18 @@ -typecheck1_e.p4(16): [--Wwarn=unused] warning: control 'p' is unused +typecheck1_e.p4(7): [--Wwarn=unused] warning: control 'p' is unused control p() ^ -typecheck1_e.p4(27): [--Werror=type-error] error: Cannot apply operation '~' to expression 'd' with type 'bool' +typecheck1_e.p4(18): [--Werror=type-error] error: Cannot apply operation '~' to expression 'd' with type 'bool' d = ~d; ^ -typecheck1_e.p4(32): [--Werror=type-error] error: +: cannot be applied to expression 'd' with type 'bool' +typecheck1_e.p4(23): [--Werror=type-error] error: +: cannot be applied to expression 'd' with type 'bool' d = d + d; ^ -typecheck1_e.p4(33): [--Werror=type-error] error: -: cannot be applied to expression 'd' with type 'bool' +typecheck1_e.p4(24): [--Werror=type-error] error: -: cannot be applied to expression 'd' with type 'bool' d = d - d; ^ -typecheck1_e.p4(35): [--Werror=type-error] error: Cannot apply ! to value a of type bit<32> +typecheck1_e.p4(26): [--Werror=type-error] error: Cannot apply ! to value a of type bit<32> a = !a; ^ -typecheck1_e.p4(36): [--Werror=type-error] error: Cannot apply ! to value b of type int<32> +typecheck1_e.p4(27): [--Werror=type-error] error: Cannot apply ! to value b of type int<32> b = !b; ^ diff --git a/testdata/p4_16_errors_outputs/typecheck_e.p4-stderr b/testdata/p4_16_errors_outputs/typecheck_e.p4-stderr index c333b5c4a5f..592741cdf54 100644 --- a/testdata/p4_16_errors_outputs/typecheck_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/typecheck_e.p4-stderr @@ -1,27 +1,27 @@ -typecheck_e.p4(18): [--Wwarn=unused] warning: control 'p' is unused +typecheck_e.p4(9): [--Wwarn=unused] warning: control 'p' is unused control p(in T x) ^ -typecheck_e.p4(21): [--Werror=type-error] error: 'f(x)' +typecheck_e.p4(12): [--Werror=type-error] error: 'f(x)' f(x); ^^^^ ---- Actual error: -typecheck_e.p4(18): Cannot cast implicitly type 'T' to type 'int<32>' +typecheck_e.p4(9): Cannot cast implicitly type 'T' to type 'int<32>' control p(in T x) ^ ---- Originating from: -typecheck_e.p4(21): Type of argument 'x' (T) does not match type of parameter 'd' (int<32>) +typecheck_e.p4(12): Type of argument 'x' (T) does not match type of parameter 'd' (int<32>) f(x); ^ -typecheck_e.p4(18) +typecheck_e.p4(9) control p(in T x) ^ -typecheck_e.p4(16) +typecheck_e.p4(7) extern void f(in int<32> d); ^ ---- Originating from: -typecheck_e.p4(16): Function type 'f' does not match invocation type '' +typecheck_e.p4(7): Function type 'f' does not match invocation type '' extern void f(in int<32> d); ^ -typecheck_e.p4(21) +typecheck_e.p4(12) f(x); ^^^^ diff --git a/testdata/p4_16_errors_outputs/underscore1_e.p4-stderr b/testdata/p4_16_errors_outputs/underscore1_e.p4-stderr index e2887390cdc..06bc3d15a88 100644 --- a/testdata/p4_16_errors_outputs/underscore1_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/underscore1_e.p4-stderr @@ -1,4 +1,4 @@ -underscore1_e.p4(17):syntax error, unexpected _ +underscore1_e.p4(8):syntax error, unexpected _ bit _ ^ [--Werror=overlimit] error: 1 errors encountered, aborting compilation diff --git a/testdata/p4_16_errors_outputs/underscore2_e.p4-stderr b/testdata/p4_16_errors_outputs/underscore2_e.p4-stderr index 959c67b3a36..cf8312cedba 100644 --- a/testdata/p4_16_errors_outputs/underscore2_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/underscore2_e.p4-stderr @@ -1,4 +1,4 @@ -underscore2_e.p4(19):syntax error, unexpected _ +underscore2_e.p4(10):syntax error, unexpected _ bit _ ^ [--Werror=overlimit] error: 1 errors encountered, aborting compilation diff --git a/testdata/p4_16_errors_outputs/underscore3_e.p4-stderr b/testdata/p4_16_errors_outputs/underscore3_e.p4-stderr index 70d29b6d9c8..eb96ec1c08d 100644 --- a/testdata/p4_16_errors_outputs/underscore3_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/underscore3_e.p4-stderr @@ -1,4 +1,4 @@ -underscore3_e.p4(16):syntax error, unexpected _ +underscore3_e.p4(7):syntax error, unexpected _ const bit _ ^ [--Werror=overlimit] error: 1 errors encountered, aborting compilation diff --git a/testdata/p4_16_errors_outputs/underscore_e.p4-stderr b/testdata/p4_16_errors_outputs/underscore_e.p4-stderr index 447400231dc..868e9e1b690 100644 --- a/testdata/p4_16_errors_outputs/underscore_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/underscore_e.p4-stderr @@ -1,4 +1,4 @@ -underscore_e.p4(16):syntax error, unexpected _ +underscore_e.p4(7):syntax error, unexpected _ extern void _ ^ [--Werror=overlimit] error: 1 errors encountered, aborting compilation diff --git a/testdata/p4_16_errors_outputs/virtual1.p4-stderr b/testdata/p4_16_errors_outputs/virtual1.p4-stderr index 9548fd710b6..e9b6d8ce0c0 100644 --- a/testdata/p4_16_errors_outputs/virtual1.p4-stderr +++ b/testdata/p4_16_errors_outputs/virtual1.p4-stderr @@ -1,28 +1,28 @@ -virtual1.p4(24): [--Werror=type-error] error: 'return ix + 1' +virtual1.p4(15): [--Werror=type-error] error: 'return ix + 1' return (ix + 1); ^^^^^^ ---- Actual error: -virtual1.p4(23): Cannot cast implicitly type 'bit<16>' to type 'bool' +virtual1.p4(14): Cannot cast implicitly type 'bit<16>' to type 'bool' bool f(in bit<16> ix) { ^^^^ ---- Originating from: -virtual1.p4(24): Source expression 'ix + 1' produces a result of type 'bit<16>' which cannot be assigned to a left-value with type 'bool' +virtual1.p4(15): Source expression 'ix + 1' produces a result of type 'bit<16>' which cannot be assigned to a left-value with type 'bool' return (ix + 1); ^^^^^^^^ -virtual1.p4(23) +virtual1.p4(14) bool f(in bit<16> ix) { ^^^^ -virtual1.p4(22): [--Werror=type-error] error: 'cntr' +virtual1.p4(13): [--Werror=type-error] error: 'cntr' Virtual() cntr = { ^^^^ ---- Actual error: -virtual1.p4(23): Cannot unify type 'bool' with type 'bit<16>' +virtual1.p4(14): Cannot unify type 'bool' with type 'bit<16>' bool f(in bit<16> ix) { ^^^^ ---- Originating from: -virtual1.p4(23): Method 'f' does not have the expected type 'f' +virtual1.p4(14): Method 'f' does not have the expected type 'f' bool f(in bit<16> ix) { ^ -virtual1.p4(18) +virtual1.p4(9) abstract bit<16> f(in bit<16> ix); ^ diff --git a/testdata/p4_16_errors_outputs/virtual2.p4-stderr b/testdata/p4_16_errors_outputs/virtual2.p4-stderr index 65188a7128b..8ad26a0fa1c 100644 --- a/testdata/p4_16_errors_outputs/virtual2.p4-stderr +++ b/testdata/p4_16_errors_outputs/virtual2.p4-stderr @@ -1,17 +1,17 @@ -virtual2.p4(24): [--Werror=type-error] error: return ix + 1: return expression in function with void return +virtual2.p4(15): [--Werror=type-error] error: return ix + 1: return expression in function with void return return (ix + 1); ^^^^^^ -virtual2.p4(22): [--Werror=type-error] error: 'cntr' +virtual2.p4(13): [--Werror=type-error] error: 'cntr' Virtual() cntr = { ^^^^ ---- Actual error: -virtual2.p4(23): Cannot unify type 'void' with type 'bit<16>' +virtual2.p4(14): Cannot unify type 'void' with type 'bit<16>' void f(in bit<16> ix) { ^^^^ ---- Originating from: -virtual2.p4(23): Method 'f' does not have the expected type 'f' +virtual2.p4(14): Method 'f' does not have the expected type 'f' void f(in bit<16> ix) { ^ -virtual2.p4(18) +virtual2.p4(9) abstract bit<16> f(in bit<16> ix); ^ diff --git a/testdata/p4_16_errors_outputs/virtual3.p4-stderr b/testdata/p4_16_errors_outputs/virtual3.p4-stderr index 47adb5b6254..2d187909700 100644 --- a/testdata/p4_16_errors_outputs/virtual3.p4-stderr +++ b/testdata/p4_16_errors_outputs/virtual3.p4-stderr @@ -1,3 +1,3 @@ -virtual3.p4(24): [--Werror=type-error] error: return : return with no expression in a function returning bit<16> +virtual3.p4(15): [--Werror=type-error] error: return : return with no expression in a function returning bit<16> return; ^^^^^^ diff --git a/testdata/p4_16_errors_outputs/virtual4.p4-stderr b/testdata/p4_16_errors_outputs/virtual4.p4-stderr index 15c45e1a5d3..6830dcab1ba 100644 --- a/testdata/p4_16_errors_outputs/virtual4.p4-stderr +++ b/testdata/p4_16_errors_outputs/virtual4.p4-stderr @@ -1,6 +1,6 @@ -virtual4.p4(23): [--Werror=type-error] error: g: no matching abstract method in Virtual +virtual4.p4(14): [--Werror=type-error] error: g: no matching abstract method in Virtual bit<16> g(in bit<16> ix) { ^ -virtual4.p4(16) +virtual4.p4(7) extern Virtual { ^^^^^^^ diff --git a/testdata/p4_16_errors_outputs/virtual5.p4-stderr b/testdata/p4_16_errors_outputs/virtual5.p4-stderr index 5eb95ba0581..8e79ee3b269 100644 --- a/testdata/p4_16_errors_outputs/virtual5.p4-stderr +++ b/testdata/p4_16_errors_outputs/virtual5.p4-stderr @@ -1,6 +1,6 @@ -virtual5.p4(26): [--Werror=type-error] error: g: no matching abstract method in Virtual +virtual5.p4(17): [--Werror=type-error] error: g: no matching abstract method in Virtual bit<16> g() { return 0; } ^ -virtual5.p4(16) +virtual5.p4(7) extern Virtual { ^^^^^^^ diff --git a/testdata/p4_16_errors_outputs/virtual6.p4-stderr b/testdata/p4_16_errors_outputs/virtual6.p4-stderr index a330e4a4428..f0c489b4583 100644 --- a/testdata/p4_16_errors_outputs/virtual6.p4-stderr +++ b/testdata/p4_16_errors_outputs/virtual6.p4-stderr @@ -1,6 +1,6 @@ -virtual6.p4(23): [--Werror=type-error] error: cntr: g abstract method not implemented +virtual6.p4(14): [--Werror=type-error] error: cntr: g abstract method not implemented Virtual() cntr = { ^^^^ -virtual6.p4(19) +virtual6.p4(10) abstract bit<16> g(); ^ diff --git a/testdata/p4_16_errors_outputs/width1_e.p4-stderr b/testdata/p4_16_errors_outputs/width1_e.p4-stderr index c8bb22d83f1..0be2a368a1c 100644 --- a/testdata/p4_16_errors_outputs/width1_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/width1_e.p4-stderr @@ -1,18 +1,18 @@ -width1_e.p4(17): [--Wwarn=unused] warning: 'c2' is unused +width1_e.p4(8): [--Wwarn=unused] warning: 'c2' is unused const int<(c1 + c1)> c2 = 0; ^^ -width1_e.p4(18): [--Wwarn=unused] warning: 'c3' is unused +width1_e.p4(9): [--Wwarn=unused] warning: 'c3' is unused const int<(-3)> c3 = 0; ^^ -width1_e.p4(19): [--Wwarn=unused] warning: 'c4' is unused +width1_e.p4(10): [--Wwarn=unused] warning: 'c4' is unused const int<(2w3 + 2w3)> c4 = 0; ^^ -width1_e.p4(16): [--Wwarn=overflow] warning: 32s0xffffffff: signed value does not fit in 32 bits +width1_e.p4(7): [--Wwarn=overflow] warning: 32s0xffffffff: signed value does not fit in 32 bits const int<32> c1 = 0xFFFFFFFF; ^^^^^^^^^^ -width1_e.p4(17): [--Werror=invalid] error: int<-2>: invalid type size +width1_e.p4(8): [--Werror=invalid] error: int<-2>: invalid type size const int<(c1 + c1)> c2 = 0; ^^^^^^^^^^^^^^ -width1_e.p4(18): [--Werror=invalid] error: int<-3>: invalid type size +width1_e.p4(9): [--Werror=invalid] error: int<-3>: invalid type size const int<(-3)> c3 = 0; ^^^^^^^^^ diff --git a/testdata/p4_16_errors_outputs/width_e.p4-stderr b/testdata/p4_16_errors_outputs/width_e.p4-stderr index 5c145288b68..11aede6ee2f 100644 --- a/testdata/p4_16_errors_outputs/width_e.p4-stderr +++ b/testdata/p4_16_errors_outputs/width_e.p4-stderr @@ -1,4 +1,4 @@ -width_e.p4(16): [--Werror=overlimit] error: 12301923123132: this implementation does not support bitstrings this large +width_e.p4(7): [--Werror=overlimit] error: 12301923123132: this implementation does not support bitstrings this large const bit<12301923123132> ^^^^^^^^^^^^^^ [--Werror=overlimit] error: 1 errors encountered, aborting compilation diff --git a/testdata/p4_16_samples/alias.p4 b/testdata/p4_16_samples/alias.p4 index 71fb2ced7b2..f75ce63da8f 100644 --- a/testdata/p4_16_samples/alias.p4 +++ b/testdata/p4_16_samples/alias.p4 @@ -1,18 +1,9 @@ /* -Copyright 2016 VMware, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * Copyright 2016 VMware, Inc. + * SPDX-FileCopyrightText: 2016 VMware, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ struct T { bit<32> b; } diff --git a/testdata/p4_16_samples_outputs/alias.p4-stderr b/testdata/p4_16_samples_outputs/alias.p4-stderr index c8f94b84d73..5ff9d320e9d 100644 --- a/testdata/p4_16_samples_outputs/alias.p4-stderr +++ b/testdata/p4_16_samples_outputs/alias.p4-stderr @@ -1,7 +1,7 @@ -alias.p4(38): [--Wwarn=unused] warning: control 'c' is unused +alias.p4(29): [--Wwarn=unused] warning: control 'c' is unused control c() { ^ -alias.p4(38): [--Winfo=removed] info: removing control 'c' +alias.p4(29): [--Winfo=removed] info: removing control 'c' control c() { ^ [--Wwarn=missing] warning: Program does not contain a `main' module diff --git a/testdata/p4_16_samples_outputs/issue1541.p4-stderr b/testdata/p4_16_samples_outputs/issue1541.p4-stderr index 5998417b26f..b6c6aef1a53 100644 --- a/testdata/p4_16_samples_outputs/issue1541.p4-stderr +++ b/testdata/p4_16_samples_outputs/issue1541.p4-stderr @@ -1,7 +1,7 @@ issue1541.p4(25): [--Wwarn=shadow] warning: 'hash' shadows 'hash' action hash() { ^^^^ -v1model.p4(444) +v1model.p4(435) extern void hash(out O result, in HashAlgorithm algo, in T base, in D data, in M max); ^^^^ issue1541.p4(25): [--Wwarn=unused] warning: 'hash' is unused diff --git a/testdata/p4_16_samples_outputs/issue841.p4-stderr b/testdata/p4_16_samples_outputs/issue841.p4-stderr index be161b83f5a..2eed86b3a3b 100644 --- a/testdata/p4_16_samples_outputs/issue841.p4-stderr +++ b/testdata/p4_16_samples_outputs/issue841.p4-stderr @@ -1,6 +1,6 @@ issue841.p4(45): [--Wwarn=deprecated] warning: Checksum16: Using deprecated feature Checksum16. Please use verify_checksum/update_checksum instead. Checksum16() checksum; ^^^^^^^^^^ -v1model.p4(456) +v1model.p4(447) extern Checksum16 { ^^^^^^^^^^ diff --git a/tools/ir-generator/generator.cpp b/tools/ir-generator/generator.cpp index 85711a9968e..fa73a92eae0 100644 --- a/tools/ir-generator/generator.cpp +++ b/tools/ir-generator/generator.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/tools/ir-generator/ir-generator.h b/tools/ir-generator/ir-generator.h index de9ce6a8ade..ad8c0cb29f7 100644 --- a/tools/ir-generator/ir-generator.h +++ b/tools/ir-generator/ir-generator.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef TOOLS_IR_GENERATOR_IR_GENERATOR_H_ #define TOOLS_IR_GENERATOR_IR_GENERATOR_H_ diff --git a/tools/ir-generator/irclass.cpp b/tools/ir-generator/irclass.cpp index 581205fa37f..e067ecac494 100644 --- a/tools/ir-generator/irclass.cpp +++ b/tools/ir-generator/irclass.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "irclass.h" diff --git a/tools/ir-generator/irclass.h b/tools/ir-generator/irclass.h index d09ebb16360..58613abb7ee 100644 --- a/tools/ir-generator/irclass.h +++ b/tools/ir-generator/irclass.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef TOOLS_IR_GENERATOR_IRCLASS_H_ #define TOOLS_IR_GENERATOR_IRCLASS_H_ diff --git a/tools/ir-generator/type.cpp b/tools/ir-generator/type.cpp index 397954c1c5c..b4b358e1c9e 100644 --- a/tools/ir-generator/type.cpp +++ b/tools/ir-generator/type.cpp @@ -1,18 +1,7 @@ -/* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +// SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. +// Copyright 2013-present Barefoot Networks, Inc. +// +// SPDX-License-Identifier: Apache-2.0 #include "type.h" diff --git a/tools/ir-generator/type.h b/tools/ir-generator/type.h index 042a53a21a9..7059963d12b 100644 --- a/tools/ir-generator/type.h +++ b/tools/ir-generator/type.h @@ -1,18 +1,9 @@ /* -Copyright 2013-present Barefoot Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. + * Copyright 2013-present Barefoot Networks, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef TOOLS_IR_GENERATOR_TYPE_H_ #define TOOLS_IR_GENERATOR_TYPE_H_