From ba22c7192ad5ed1fc1f6f67d96eae3db34982c8d Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 3 May 2024 16:43:24 +0200 Subject: [PATCH] added SPDX to specs --- specification/shiplanding_formula.tbt | 3 +++ specification/shiplanding_formula_combined.tbt | 3 +++ src/tbt.pest | 5 +++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/specification/shiplanding_formula.tbt b/specification/shiplanding_formula.tbt index 0c11fc4..a26e9a2 100644 --- a/specification/shiplanding_formula.tbt +++ b/specification/shiplanding_formula.tbt @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2023 German Aerospace Center (DLR) +// SPDX-License-Identifier: Apache-2.0 + Deg45_HeightAboveShip = 20.0; Deg45_DistanceToShip = 30.0; Deg45_AngleToShip = 135.0; diff --git a/specification/shiplanding_formula_combined.tbt b/specification/shiplanding_formula_combined.tbt index a2eaa06..7dbdf87 100644 --- a/specification/shiplanding_formula_combined.tbt +++ b/specification/shiplanding_formula_combined.tbt @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2023 German Aerospace Center (DLR) +// SPDX-License-Identifier: Apache-2.0 + Deg45_HeightAboveShip = 20.0; Deg45_DistanceToShip = 30.0; Deg45_AngleToShip = 135.0; diff --git a/src/tbt.pest b/src/tbt.pest index 098ed4e..647fd71 100644 --- a/src/tbt.pest +++ b/src/tbt.pest @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2023 German Aerospace Center (DLR) // SPDX-License-Identifier: Apache-2.0 -Specification = { Constants ~ TBT } +Specification = { COMMENT ~ Constants ~ TBT } // Constants Constants = { Constant* } @@ -67,4 +67,5 @@ Under = _{ "_" } Float = { ("-")? ~ Number ~ ("." ~ Number)? } Word = { Letter~(Letter | Digit | Under)* } Number = { '0'..'9'+ } -WHITESPACE = _{ " " | "\t" | "\r" | "\n"} \ No newline at end of file +WHITESPACE = _{ " " | "\t" | "\r" | "\n"} +COMMENT = _{ ("/*" ~ (!"*/" ~ ANY)* ~ "*/") | ("//" ~(!("\n")~ANY)*~ "\n"? ) } \ No newline at end of file