From a9c62ac9b339211d80b013eac75ba47f8a39d478 Mon Sep 17 00:00:00 2001 From: fche Date: Mon, 12 Dec 2005 17:39:53 +0000 Subject: 2005-12-12 Frank Ch. Eigler Fix parse tree pretty-printer. * staptree.h (print_format): Add raw_components field. * parse.cxx (parse_symbol): Set it. * staptree.cxx (lex_cast_qstring): Copy it here too. (binary_expression::print): Add a space around operator, due to lexical ambiguity (expr % paren-expr) vs %( preprocessor op. (array_in:: foreach_loop:: arrayindex::print): Print base as indexable. (print_format::string_to_components): Use parse_error, not semantic. (print_format::print): Properly quote formatting string. Print histogram argument. * translate.cxx (visit_print_format): Properly quote formatting string. (varlock): Reword lock timeout error message. * testsuite/buildok/printf.stp: Add some quoting troublemakers. * testsuite/parseok/unparser.stp: New file. --- testsuite/parseok/unparser.stp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 testsuite/parseok/unparser.stp (limited to 'testsuite/parseok/unparser.stp') diff --git a/testsuite/parseok/unparser.stp b/testsuite/parseok/unparser.stp new file mode 100755 index 00000000..710c4636 --- /dev/null +++ b/testsuite/parseok/unparser.stp @@ -0,0 +1,21 @@ +#! /bin/sh + +set -e + +for dir in ${SRCDIR}/testsuite/parseok \ +${SRCDIR}/testsuite/semok \ +${SRCDIR}/testsuite/semko \ +${SRCDIR}/testsuite/transok \ +${SRCDIR}/testsuite/transko \ +${SRCDIR}/testsuite/buildok \ +${SRCDIR}/testsuite/buildko +do + for file in $dir/*.stp + do + if head -1 $file | grep -q stap + then + echo $file + ./stap -p1 $file | ./stap -p1 - > /dev/null + fi + done +done -- cgit