From 9110240b090c04aaf62250c9a80eb5744a712dce Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 11 Jan 2020 17:50:38 +0000 Subject: [PATCH] spv: Change comments in grammars from # to //. I want to use # in the syntax, so it can't be the comment character anymore. --- src/output/spv/binary-parser-generator | 2 +- src/output/spv/detail-xml.grammar | 32 +++++++++++----------- src/output/spv/light-binary.grammar | 30 ++++++++++---------- src/output/spv/old-binary.grammar | 38 +++++++++++++------------- src/output/spv/structure-xml.grammar | 30 ++++++++++---------- src/output/spv/xml-parser-generator | 2 +- 6 files changed, 67 insertions(+), 67 deletions(-) diff --git a/src/output/spv/binary-parser-generator b/src/output/spv/binary-parser-generator index a62456c4b3..e4400f116b 100644 --- a/src/output/spv/binary-parser-generator +++ b/src/output/spv/binary-parser-generator @@ -92,7 +92,7 @@ def get_token(): line = line.lstrip() if line == "": get_token() - elif line[0] == '#': + elif line.startswith('//'): line = '' get_token() elif line[0] in '[]()?|*': diff --git a/src/output/spv/detail-xml.grammar b/src/output/spv/detail-xml.grammar index 37bbabcf25..c5ddae8474 100644 --- a/src/output/spv/detail-xml.grammar +++ b/src/output/spv/detail-xml.grammar @@ -1,18 +1,18 @@ -# PSPP - a program for statistical analysis. -# Copyright (C) 2017, 2018, 2019 Free Software Foundation, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +// PSPP - a program for statistical analysis. +// Copyright (C) 2017, 2018, 2019 Free Software Foundation, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . visualization :creator @@ -41,7 +41,7 @@ extension[visualization_extension] :maxWidthSet=(true)? => EMPTY -userSource :missing=(listwise | pairwise)? => EMPTY # Related to omit_empty? +userSource :missing=(listwise | pairwise)? => EMPTY // Related to omit_empty? categoricalDomain => variableReference simpleSort diff --git a/src/output/spv/light-binary.grammar b/src/output/spv/light-binary.grammar index cf6e6c5fc3..82308cd3cf 100644 --- a/src/output/spv/light-binary.grammar +++ b/src/output/spv/light-binary.grammar @@ -1,18 +1,18 @@ -# PSPP - a program for statistical analysis. -# Copyright (C) 2017, 2018, 2019 Free Software Foundation, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +// PSPP - a program for statistical analysis. +// Copyright (C) 2017, 2018, 2019 Free Software Foundation, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . Table => Header Titles Footnotes diff --git a/src/output/spv/old-binary.grammar b/src/output/spv/old-binary.grammar index 12f4bbc284..5c52f2d1a3 100644 --- a/src/output/spv/old-binary.grammar +++ b/src/output/spv/old-binary.grammar @@ -1,32 +1,32 @@ -# PSPP - a program for statistical analysis. -# Copyright (C) 2017, 2018, 2019 Free Software Foundation, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +// PSPP - a program for statistical analysis. +// Copyright (C) 2017, 2018, 2019 Free Software Foundation, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . LegacyBinary => 00 byte[version] int16[n-sources] int32[member-size] Metadata*[n-sources][metadata] - #Data*[n-sources][data] - #Strings? + //Data*[n-sources][data] + //Strings? Metadata => int32[n-values] int32[n-variables] int32[data-offset] byte*28[source-name] vB0(byte*36[ext-source-name] int32[x]) -#Data => Variable*[n-variables] -#Variable => byte*288[variable-name] double*[n-values] +//Data => Variable*[n-variables] +//Variable => byte*288[variable-name] double*[n-values] Strings => SourceMaps[maps] Labels diff --git a/src/output/spv/structure-xml.grammar b/src/output/spv/structure-xml.grammar index 61dc5d48f4..f9b3e75f3a 100644 --- a/src/output/spv/structure-xml.grammar +++ b/src/output/spv/structure-xml.grammar @@ -1,18 +1,18 @@ -# PSPP - a program for statistical analysis. -# Copyright (C) 2017, 2018, 2019 Free Software Foundation, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +// PSPP - a program for statistical analysis. +// Copyright (C) 2017, 2018, 2019 Free Software Foundation, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . heading[root_heading] :creator-version? diff --git a/src/output/spv/xml-parser-generator b/src/output/spv/xml-parser-generator index e85be59171..546ca97d00 100644 --- a/src/output/spv/xml-parser-generator +++ b/src/output/spv/xml-parser-generator @@ -39,7 +39,7 @@ def get_line(): global line global line_number line = input_file.readline() - line = re.sub('#.*', '\n', line) + line = re.sub('//.*', '\n', line) line_number += 1 -- 2.30.2