etisserant@0: /* etisserant@0: * (c) 2003 Mario de Sousa etisserant@0: * etisserant@0: * Offered to the public under the terms of the GNU General Public License etisserant@0: * as published by the Free Software Foundation; either version 2 of the etisserant@0: * License, or (at your option) any later version. etisserant@0: * etisserant@0: * This program is distributed in the hope that it will be useful, but etisserant@0: * WITHOUT ANY WARRANTY; without even the implied warranty of etisserant@0: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General etisserant@0: * Public License for more details. etisserant@0: * etisserant@0: * This code is made available on the understanding that it will not be etisserant@0: * used in safety-critical situations without a full and competent review. etisserant@0: */ etisserant@0: etisserant@0: /* etisserant@0: * An IEC 61131-3 IL and ST compiler. etisserant@0: * etisserant@0: * Based on the etisserant@0: * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10) etisserant@0: * etisserant@0: */ etisserant@0: etisserant@0: etisserant@0: /* etisserant@0: * This file contains the code that stores the output generated etisserant@0: * by each specific version of the 4th stage. etisserant@0: */ etisserant@0: etisserant@0: etisserant@0: #include "../absyntax/absyntax.hh" etisserant@0: etisserant@0: etisserant@0: class stage4out_c { etisserant@0: public: etisserant@0: std::string indent_level; etisserant@0: std::string indent_spaces; etisserant@0: etisserant@0: public: etisserant@0: stage4out_c(std::string indent_level = " "); etisserant@0: ~stage4out_c(void); etisserant@0: etisserant@0: void indent_right(void); etisserant@0: void indent_left(void); etisserant@0: etisserant@0: void *print(const char *str); etisserant@0: void *print(std::string str); etisserant@0: etisserant@0: void *printupper(const char *str); etisserant@0: void *printupper(std::string str); etisserant@0: }; etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: int stage4(symbol_c *tree_root);