pdl: Add apache header to source files

Preparation for moving the PDL implementation
open source.

Test: NA
Bug: 278555651
Change-Id: I874d9206f7cadf08476a46ba1cc3e11a94fd6d5e
diff --git a/tools/pdl/scripts/generate_cxx_backend.py b/tools/pdl/scripts/generate_cxx_backend.py
index d86b112..a728d13 100755
--- a/tools/pdl/scripts/generate_cxx_backend.py
+++ b/tools/pdl/scripts/generate_cxx_backend.py
@@ -1,5 +1,19 @@
 #!/usr/bin/env python3
 
+# Copyright 2023 Google LLC
+#
+# 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
+#
+#     https://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.
+
 import argparse
 from dataclasses import dataclass, field
 import json
diff --git a/tools/pdl/scripts/generate_cxx_backend_tests.py b/tools/pdl/scripts/generate_cxx_backend_tests.py
index 097c648..1f90600 100755
--- a/tools/pdl/scripts/generate_cxx_backend_tests.py
+++ b/tools/pdl/scripts/generate_cxx_backend_tests.py
@@ -1,5 +1,19 @@
 #!/usr/bin/env python3
 
+# Copyright 2023 Google LLC
+#
+# 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
+#
+#     https://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.
+
 import argparse
 from dataclasses import dataclass, field
 import json
diff --git a/tools/pdl/scripts/generate_python_backend.py b/tools/pdl/scripts/generate_python_backend.py
index ea13a8c..3a1a82b 100755
--- a/tools/pdl/scripts/generate_python_backend.py
+++ b/tools/pdl/scripts/generate_python_backend.py
@@ -1,5 +1,19 @@
 #!/usr/bin/env python3
 
+# Copyright 2023 Google LLC
+#
+# 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
+#
+#     https://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.
+
 import argparse
 from dataclasses import dataclass, field
 import json
diff --git a/tools/pdl/scripts/pdl/ast.py b/tools/pdl/scripts/pdl/ast.py
index 89e6152..4f884e5 100644
--- a/tools/pdl/scripts/pdl/ast.py
+++ b/tools/pdl/scripts/pdl/ast.py
@@ -1,3 +1,17 @@
+# Copyright 2023 Google LLC
+#
+# 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
+#
+#     https://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.
+
 from dataclasses import dataclass, field
 from typing import Optional, List, Dict, Tuple
 
diff --git a/tools/pdl/scripts/pdl/core.py b/tools/pdl/scripts/pdl/core.py
index 9a1a74d..f55bb30 100644
--- a/tools/pdl/scripts/pdl/core.py
+++ b/tools/pdl/scripts/pdl/core.py
@@ -1,3 +1,17 @@
+# Copyright 2023 Google LLC
+#
+# 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
+#
+#     https://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.
+
 from typing import Optional, List, Dict, Union, Tuple, Set
 from .ast import *
 
diff --git a/tools/pdl/scripts/pdl/utils.py b/tools/pdl/scripts/pdl/utils.py
index 675bf4d..24e91ca 100644
--- a/tools/pdl/scripts/pdl/utils.py
+++ b/tools/pdl/scripts/pdl/utils.py
@@ -1,3 +1,17 @@
+# Copyright 2023 Google LLC
+#
+# 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
+#
+#     https://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.
+
 from typing import List, Tuple, Union, Optional
 
 
diff --git a/tools/pdl/src/analyzer.rs b/tools/pdl/src/analyzer.rs
index acb3bb7..e9e8d25 100644
--- a/tools/pdl/src/analyzer.rs
+++ b/tools/pdl/src/analyzer.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 use codespan_reporting::diagnostic::Diagnostic;
 use codespan_reporting::files;
 use codespan_reporting::term;
diff --git a/tools/pdl/src/ast.rs b/tools/pdl/src/ast.rs
index f676a4f..da46c13 100644
--- a/tools/pdl/src/ast.rs
+++ b/tools/pdl/src/ast.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 use codespan_reporting::diagnostic;
 use codespan_reporting::files;
 use serde::Serialize;
diff --git a/tools/pdl/src/backends.rs b/tools/pdl/src/backends.rs
index 3a82fa1..a80f1f9 100644
--- a/tools/pdl/src/backends.rs
+++ b/tools/pdl/src/backends.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 //! Compiler backends.
 
 pub mod intermediate;
diff --git a/tools/pdl/src/backends/intermediate.rs b/tools/pdl/src/backends/intermediate.rs
index 74f07b7..e0d1041 100644
--- a/tools/pdl/src/backends/intermediate.rs
+++ b/tools/pdl/src/backends/intermediate.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 use std::collections::{hash_map::Entry, HashMap};
 
 use crate::ast;
diff --git a/tools/pdl/src/backends/json.rs b/tools/pdl/src/backends/json.rs
index edf38d3..460d72c 100644
--- a/tools/pdl/src/backends/json.rs
+++ b/tools/pdl/src/backends/json.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 //! Rust compiler backend.
 
 use crate::parser;
diff --git a/tools/pdl/src/backends/rust.rs b/tools/pdl/src/backends/rust.rs
index 8c90d26..268bc33 100644
--- a/tools/pdl/src/backends/rust.rs
+++ b/tools/pdl/src/backends/rust.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 //! Rust compiler backend.
 
 use crate::{ast, lint};
diff --git a/tools/pdl/src/backends/rust/parser.rs b/tools/pdl/src/backends/rust/parser.rs
index 62dd8f7..31f46ca 100644
--- a/tools/pdl/src/backends/rust/parser.rs
+++ b/tools/pdl/src/backends/rust/parser.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 use crate::analyzer::ast as analyzer_ast;
 use crate::backends::rust::{
     constraint_to_value, find_constrained_parent_fields, mask_bits, types, ToUpperCamelCase,
diff --git a/tools/pdl/src/backends/rust/preamble.rs b/tools/pdl/src/backends/rust/preamble.rs
index a048a14..71c03f6 100644
--- a/tools/pdl/src/backends/rust/preamble.rs
+++ b/tools/pdl/src/backends/rust/preamble.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 use std::path::Path;
 
 use crate::quote_block;
diff --git a/tools/pdl/src/backends/rust/serializer.rs b/tools/pdl/src/backends/rust/serializer.rs
index 74ac88e..7ef3bf2 100644
--- a/tools/pdl/src/backends/rust/serializer.rs
+++ b/tools/pdl/src/backends/rust/serializer.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 use crate::analyzer::ast as analyzer_ast;
 use crate::backends::rust::{mask_bits, types, ToUpperCamelCase};
 use crate::{ast, lint};
diff --git a/tools/pdl/src/backends/rust/types.rs b/tools/pdl/src/backends/rust/types.rs
index 9845cda..bd73c0d 100644
--- a/tools/pdl/src/backends/rust/types.rs
+++ b/tools/pdl/src/backends/rust/types.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 //! Utility functions for dealing with Rust integer types.
 
 use crate::analyzer::ast as analyzer_ast;
diff --git a/tools/pdl/src/backends/rust_no_allocation/computed_values.rs b/tools/pdl/src/backends/rust_no_allocation/computed_values.rs
index 7839a28..37ef655 100644
--- a/tools/pdl/src/backends/rust_no_allocation/computed_values.rs
+++ b/tools/pdl/src/backends/rust_no_allocation/computed_values.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 use proc_macro2::{Ident, TokenStream};
 use quote::{format_ident, quote};
 
diff --git a/tools/pdl/src/backends/rust_no_allocation/enums.rs b/tools/pdl/src/backends/rust_no_allocation/enums.rs
index 77a49b1..663566a 100644
--- a/tools/pdl/src/backends/rust_no_allocation/enums.rs
+++ b/tools/pdl/src/backends/rust_no_allocation/enums.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 use proc_macro2::{Literal, TokenStream};
 use quote::{format_ident, quote};
 
diff --git a/tools/pdl/src/backends/rust_no_allocation/mod.rs b/tools/pdl/src/backends/rust_no_allocation/mod.rs
index a84f43d..858526f 100644
--- a/tools/pdl/src/backends/rust_no_allocation/mod.rs
+++ b/tools/pdl/src/backends/rust_no_allocation/mod.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 //! Rust no-allocation backend
 //!
 //! The motivation for this backend is to be a more "idiomatic" backend than
diff --git a/tools/pdl/src/backends/rust_no_allocation/packet_parser.rs b/tools/pdl/src/backends/rust_no_allocation/packet_parser.rs
index 5ddb6c9..44342fb 100644
--- a/tools/pdl/src/backends/rust_no_allocation/packet_parser.rs
+++ b/tools/pdl/src/backends/rust_no_allocation/packet_parser.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 use std::iter::empty;
 
 use proc_macro2::TokenStream;
diff --git a/tools/pdl/src/backends/rust_no_allocation/packet_serializer.rs b/tools/pdl/src/backends/rust_no_allocation/packet_serializer.rs
index 4877ae3..9ecae38 100644
--- a/tools/pdl/src/backends/rust_no_allocation/packet_serializer.rs
+++ b/tools/pdl/src/backends/rust_no_allocation/packet_serializer.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 use std::collections::HashMap;
 
 use proc_macro2::TokenStream;
diff --git a/tools/pdl/src/backends/rust_no_allocation/preamble.rs b/tools/pdl/src/backends/rust_no_allocation/preamble.rs
index 1be597c..30f8486 100644
--- a/tools/pdl/src/backends/rust_no_allocation/preamble.rs
+++ b/tools/pdl/src/backends/rust_no_allocation/preamble.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 use std::convert::TryFrom;
 use std::convert::TryInto;
 use std::ops::Deref;
diff --git a/tools/pdl/src/backends/rust_no_allocation/test.rs b/tools/pdl/src/backends/rust_no_allocation/test.rs
index f6bc989..18aa82b 100644
--- a/tools/pdl/src/backends/rust_no_allocation/test.rs
+++ b/tools/pdl/src/backends/rust_no_allocation/test.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 use std::collections::HashMap;
 
 use proc_macro2::TokenStream;
diff --git a/tools/pdl/src/backends/rust_no_allocation/test_preamble.rs b/tools/pdl/src/backends/rust_no_allocation/test_preamble.rs
index dcb5b13..f7c1200 100644
--- a/tools/pdl/src/backends/rust_no_allocation/test_preamble.rs
+++ b/tools/pdl/src/backends/rust_no_allocation/test_preamble.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 #![allow(non_snake_case)]
 #![allow(non_camel_case_types)]
 #![allow(warnings, missing_docs)]
diff --git a/tools/pdl/src/backends/rust_no_allocation/utils.rs b/tools/pdl/src/backends/rust_no_allocation/utils.rs
index d4babbc..a9286de 100644
--- a/tools/pdl/src/backends/rust_no_allocation/utils.rs
+++ b/tools/pdl/src/backends/rust_no_allocation/utils.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 use proc_macro2::Ident;
 use quote::format_ident;
 
diff --git a/tools/pdl/src/bin/generate-canonical-tests.rs b/tools/pdl/src/bin/generate-canonical-tests.rs
index 5eb5b8e..070cd3c 100644
--- a/tools/pdl/src/bin/generate-canonical-tests.rs
+++ b/tools/pdl/src/bin/generate-canonical-tests.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 //! Generate Rust unit tests for canonical test vectors.
 
 use quote::{format_ident, quote};
diff --git a/tools/pdl/src/lint.rs b/tools/pdl/src/lint.rs
index 72231c6..27457ac 100644
--- a/tools/pdl/src/lint.rs
+++ b/tools/pdl/src/lint.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 use std::collections::HashMap;
 
 use crate::analyzer::ast as analyzer_ast;
diff --git a/tools/pdl/src/main.rs b/tools/pdl/src/main.rs
index 3812277..f4a6319 100644
--- a/tools/pdl/src/main.rs
+++ b/tools/pdl/src/main.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 //! PDL parser and analyzer.
 
 use codespan_reporting::term::{self, termcolor};
diff --git a/tools/pdl/src/parser.rs b/tools/pdl/src/parser.rs
index 27e40d3..6d19648 100644
--- a/tools/pdl/src/parser.rs
+++ b/tools/pdl/src/parser.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 use codespan_reporting::diagnostic::Diagnostic;
 use codespan_reporting::files;
 use pest::iterators::{Pair, Pairs};
diff --git a/tools/pdl/src/test_utils.rs b/tools/pdl/src/test_utils.rs
index bf4573d..7e618f6 100644
--- a/tools/pdl/src/test_utils.rs
+++ b/tools/pdl/src/test_utils.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 //! Various utility functions used in tests.
 
 // This file is included directly into integration tests in the
diff --git a/tools/pdl/src/utils.rs b/tools/pdl/src/utils.rs
index 34f2026..0e64250 100644
--- a/tools/pdl/src/utils.rs
+++ b/tools/pdl/src/utils.rs
@@ -1,3 +1,17 @@
+// Copyright 2023 Google LLC
+//
+// 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
+//
+//     https://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.
+
 /// Placeholder implementation of Vec::drain_filter.
 /// The feature drain_filter is currently unstable.
 pub fn drain_filter<T, F>(input: &mut Vec<T>, predicate: F) -> Vec<T>
diff --git a/tools/pdl/tests/custom_types.py b/tools/pdl/tests/custom_types.py
index 72484c6..cac9896 100644
--- a/tools/pdl/tests/custom_types.py
+++ b/tools/pdl/tests/custom_types.py
@@ -1,3 +1,17 @@
+# Copyright 2023 Google LLC
+#
+# 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
+#
+#     https://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.
+
 from dataclasses import dataclass
 from typing import Tuple
 
diff --git a/tools/pdl/tests/generated_files_compile.sh b/tools/pdl/tests/generated_files_compile.sh
index 35a4a15..583abac 100755
--- a/tools/pdl/tests/generated_files_compile.sh
+++ b/tools/pdl/tests/generated_files_compile.sh
@@ -1,5 +1,19 @@
 #!/usr/bin/env bash
 
+# Copyright 2023 Google LLC
+#
+# 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
+#
+#     https://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.
+
 # Run this script with a number of Rust files as input. It will combine them to
 # a single file which you can compile to check the validity of the inputs.
 #
diff --git a/tools/pdl/tests/python_generator_test.py b/tools/pdl/tests/python_generator_test.py
index ff63da6..dbd0c5b 100644
--- a/tools/pdl/tests/python_generator_test.py
+++ b/tools/pdl/tests/python_generator_test.py
@@ -1,6 +1,18 @@
 #!/usr/bin/env python3
+
+# Copyright 2023 Google LLC
 #
-# Copyright (C) 2015 The Android Open Source Project
+# 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
+#
+#     https://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.
 #
 # Tests the generated python backend against standard PDL
 # constructs, with matching input vectors.