spv: Change comments in grammars from # to //.
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 11 Jan 2020 17:50:38 +0000 (17:50 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 11 Jan 2020 17:51:00 +0000 (17:51 +0000)
I want to use # in the syntax, so it can't be the comment character
anymore.

src/output/spv/binary-parser-generator
src/output/spv/detail-xml.grammar
src/output/spv/light-binary.grammar
src/output/spv/old-binary.grammar
src/output/spv/structure-xml.grammar
src/output/spv/xml-parser-generator

index a62456c4b3498a22316ce465eac03cc351ff388d..e4400f116b0215fc9423ab059a465a4d59648378 100644 (file)
@@ -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 '[]()?|*':
index 37bbabcf2519875d0081dffe5e3d02197303a4c8..c5ddae847418f040883fa8cfea6c10e8a59f5a75 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
+// 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 <http://www.gnu.org/licenses/>.
 
 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
 
index cf6e6c5fc30a877a318553e4884f0e2253b16a51..82308cd3cf08cc8b39637d6237a6950a9b2b95b2 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
+// 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 <http://www.gnu.org/licenses/>.
 
 Table =>
    Header Titles Footnotes
index 12f4bbc2849493bada8f501c834b16d5f8f33f46..5c52f2d1a37f4ee05da07e4cd67704527b0f2892 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
+// 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 <http://www.gnu.org/licenses/>.
 
 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
 
index 61dc5d48f4b6d0837fe4df837e433f06bb6c8f07..f9b3e75f3a4bc656e84d8bc6159a1a18e9dd5129 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
+// 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 <http://www.gnu.org/licenses/>.
 
 heading[root_heading]
    :creator-version?
index e85be59171075480749c53ef72937da38f71e156..546ca97d00f2d76a512cccf2447a209a6050ebd5 100644 (file)
@@ -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