# PSPP - a program for statistical analysis.
# Copyright (C) 2017 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/>.
-#
+#
## Process this file with automake to produce Makefile.in -*- makefile -*-
src_output_liboutput_la_SOURCES += \
array_suffix = '[%d]' % item.n
else:
n_stars += 1
-
+
print("%s%s %s%s%s;" % (indent, typename, '*' * n_stars,
name_to_id(item.name),
array_suffix))
indent, '_be' if endian == 'big' else '', limit,
indent, self.bail))
return limit
-
+
def print_parser_items(name, production, indent, accessor, ctx):
for item_idx in range(len(production)):
indent, accessor, item.name, choice_name[-2:]))
print('')
choice = choice[1:]
-
+
print_parser_items(name, choice, indent + ' ',
accessor + choice_name + '.', ctx)
i += 1
print('%s%sif (p->%s%s == %s) {' % (
indent, '} else ' if i else '', accessor, item.name,
value_name))
-
+
print_free_items(name, choice, indent + ' ',
accessor + choice_name + '.', ctx)
i += 1
print('%s%sif (p->%s%s == %s) {' % (
indent, '} else ' if i else '', accessor, item.name,
value_name))
-
+
print_print_items(name, choice, indent + ' ',
accessor + choice_name + '.', ctx)
i += 1
def name_to_id(s):
return s[0].lower() + ''.join(['_%c' % x.lower() if x.isupper() else x
for x in s[1:]]).replace('-', '_')
-
+
if __name__ == "__main__":
argv0 = sys.argv[0]
function.code += [
'p->%s = xrealloc (p->%s, sizeof *p->%s * (p->n_%s + 1));'
% (member, member, member, member),
- 'p->%s[p->n_%s++] = %s;' % (member, member,
+ 'p->%s[p->n_%s++] = %s;' % (member, member,
'&%s->node_' % member
if state == STATE_GENERAL
else member)]
'prefix': prefix,
'name': name,
'ref_type': name_to_id(value[1])})
-
+
print_recurse_members(attributes, rhs, 'resolve_refs')