absyntax/visitor.hh
author mjsousa
Sat, 27 Dec 2014 09:41:01 +0000
changeset 976 619a2b9f6edf
parent 680 df783da3ebe2
permissions -rwxr-xr-x
Add comments.
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
     1
/*
261
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 69
diff changeset
     2
 *  matiec - a compiler for the programming languages defined in IEC 61131-3
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 69
diff changeset
     3
 *  Copyright (C) 2003-2011  Mario de Sousa (msousa@fe.up.pt)
279
c0453b7f99df Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents: 261
diff changeset
     4
 *  Copyright (C) 2007-2011  Laurent Bessard and Edouard Tisserant
261
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 69
diff changeset
     5
 *
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 69
diff changeset
     6
 *  This program is free software: you can redistribute it and/or modify
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 69
diff changeset
     7
 *  it under the terms of the GNU General Public License as published by
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 69
diff changeset
     8
 *  the Free Software Foundation, either version 3 of the License, or
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 69
diff changeset
     9
 *  (at your option) any later version.
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 69
diff changeset
    10
 *
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 69
diff changeset
    11
 *  This program is distributed in the hope that it will be useful,
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 69
diff changeset
    12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 69
diff changeset
    13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 69
diff changeset
    14
 *  GNU General Public License for more details.
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 69
diff changeset
    15
 *
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 69
diff changeset
    16
 *  You should have received a copy of the GNU General Public License
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 69
diff changeset
    17
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 69
diff changeset
    18
 *
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    19
 *
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    20
 * This code is made available on the understanding that it will not be
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    21
 * used in safety-critical situations without a full and competent review.
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    22
 */
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    23
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    24
/*
261
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 69
diff changeset
    25
 * An IEC 61131-3 compiler.
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    26
 *
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    27
 * Based on the
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    28
 * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    29
 *
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    30
 */
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    31
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    32
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    33
/*
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    34
 * VISITOR.HH
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    35
 *
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    36
 *
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    37
 * The asbract syntax tree is scaned several times
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    38
 * during the whole compilation process. For e.g., stage 3 verifies
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    39
 * semantics, and stage 4 produces output.
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    40
 *
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    41
 * Since the number of functions that need to scan through
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    42
 * the abtract syntax tree may increase in time, (e.g. new
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    43
 * output formats, new semantic checks, etc...) while the
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    44
 * abstract syntax tree class structure is pretty stable
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    45
 * (i.e. the ST and IL languages will not be changing much...),
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    46
 * we use the 'visitor' design patern.
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    47
 *
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    48
 * It is not strictly necessary to use this pattern, but it does
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    49
 * have the advantage of bringing together the functions
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    50
 * that implement the same algorithm, each on a different
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    51
 * class of object in the abstract syntax tree.
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    52
 *
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    53
 *
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    54
 * This file contains the interface that each visitor class
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    55
 * must implement in order to be able to visit the abstract
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    56
 * syntax tree (class visitor_c)
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    57
 *
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    58
 * Three implementations of this interface are also provided,
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    59
 * that may be later extended to execute a particular algorithm.
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    60
 *
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    61
 * The null (class null_visitor_c) does nothing.
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    62
 *
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    63
 * The iterator (class iterator_visitor_c) iterates through
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    64
 * every object in the syntax tree.
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    65
 *
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    66
 * The search class (class search_visitor_c) iterates through
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    67
 * every object, until one returns a value != NULL.
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    68
 */
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    69
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    70
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    71
#ifndef _VISITOR_HH
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    72
#define _VISITOR_HH
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    73
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    74
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    75
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    76
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    77
#include "absyntax.hh"
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    78
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    79
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    80
680
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
    81
#define SYM_LIST(class_name_c, ...)                                             virtual void *visit(class_name_c *symbol) = 0;
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
    82
#define SYM_TOKEN(class_name_c, ...)                                            virtual void *visit(class_name_c *symbol) = 0;
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
    83
#define SYM_REF0(class_name_c, ...)                                             virtual void *visit(class_name_c *symbol) = 0;
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
    84
#define SYM_REF1(class_name_c, ref1, ...)                                       virtual void *visit(class_name_c *symbol) = 0;
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
    85
#define SYM_REF2(class_name_c, ref1, ref2, ...)                                 virtual void *visit(class_name_c *symbol) = 0;
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
    86
#define SYM_REF3(class_name_c, ref1, ref2, ref3, ...)                           virtual void *visit(class_name_c *symbol) = 0;
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
    87
#define SYM_REF4(class_name_c, ref1, ref2, ref3, ref4, ...)                     virtual void *visit(class_name_c *symbol) = 0;
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
    88
#define SYM_REF5(class_name_c, ref1, ref2, ref3, ref4, ref5, ...)               virtual void *visit(class_name_c *symbol) = 0;
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
    89
#define SYM_REF6(class_name_c, ref1, ref2, ref3, ref4, ref5, ref6, ...)         virtual void *visit(class_name_c *symbol) = 0;
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    90
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    91
class visitor_c {
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    92
  public:
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    93
  #include "absyntax.def"
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    94
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    95
  virtual ~visitor_c(void);
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    96
};
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    97
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    98
#undef SYM_LIST
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    99
#undef SYM_TOKEN
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   100
#undef SYM_REF0
69
41cb5b80416e Adding basic error checking.
mario
parents: 0
diff changeset
   101
#undef SYM_REF1
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   102
#undef SYM_REF2
69
41cb5b80416e Adding basic error checking.
mario
parents: 0
diff changeset
   103
#undef SYM_REF3
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   104
#undef SYM_REF4
69
41cb5b80416e Adding basic error checking.
mario
parents: 0
diff changeset
   105
#undef SYM_REF5
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   106
#undef SYM_REF6
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   107
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   108
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   109
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   110
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   111
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   112
680
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   113
#define SYM_LIST(class_name_c, ...)                                             virtual void *visit(class_name_c *symbol);
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   114
#define SYM_TOKEN(class_name_c, ...)                                            virtual void *visit(class_name_c *symbol);
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   115
#define SYM_REF0(class_name_c, ...)                                             virtual void *visit(class_name_c *symbol);
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   116
#define SYM_REF1(class_name_c, ref1, ...)                                       virtual void *visit(class_name_c *symbol);
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   117
#define SYM_REF2(class_name_c, ref1, ref2, ...)                                 virtual void *visit(class_name_c *symbol);
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   118
#define SYM_REF3(class_name_c, ref1, ref2, ref3, ...)                           virtual void *visit(class_name_c *symbol);
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   119
#define SYM_REF4(class_name_c, ref1, ref2, ref3, ref4, ...)                     virtual void *visit(class_name_c *symbol);
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   120
#define SYM_REF5(class_name_c, ref1, ref2, ref3, ref4, ref5, ...)               virtual void *visit(class_name_c *symbol);
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   121
#define SYM_REF6(class_name_c, ref1, ref2, ref3, ref4, ref5, ref6, ...)         virtual void *visit(class_name_c *symbol);
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   122
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   123
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   124
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   125
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   126
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   127
class null_visitor_c: public visitor_c {
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   128
  public:
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   129
  #include "absyntax.def"
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   130
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   131
  virtual ~null_visitor_c(void);
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   132
};
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   133
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   134
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   135
680
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   136
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   137
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   138
class fcall_visitor_c: public visitor_c {
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   139
  public:
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   140
  virtual void fcall(symbol_c *symbol) = 0;
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   141
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   142
  public:
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   143
  #include "absyntax.def"
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   144
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   145
//   virtual ~fcall_visitor_c(void);
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   146
};
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   147
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   148
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   149
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   150
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   151
class iterator_visitor_c: public visitor_c {
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   152
  protected:
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   153
  void *visit_list(list_c *list);
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   154
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   155
  public:
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   156
  #include "absyntax.def"
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   157
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   158
  virtual ~iterator_visitor_c(void);
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   159
};
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   160
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   161
680
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   162
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   163
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   164
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   165
class fcall_iterator_visitor_c: public iterator_visitor_c {
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   166
  public:
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   167
  virtual void prefix_fcall(symbol_c *symbol);
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   168
  virtual void suffix_fcall(symbol_c *symbol);
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   169
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   170
  public:
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   171
  #include "absyntax.def"
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   172
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   173
  virtual ~fcall_iterator_visitor_c(void);
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   174
};
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   175
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   176
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   177
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   178
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   179
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   180
class search_visitor_c: public visitor_c {
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   181
  protected:
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   182
  void *visit_list(list_c *list);
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   183
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   184
  public:
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   185
  #include "absyntax.def"
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   186
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   187
  virtual ~search_visitor_c(void);
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   188
};
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   189
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   190
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   191
#undef SYM_LIST
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   192
#undef SYM_TOKEN
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   193
#undef SYM_REF0
69
41cb5b80416e Adding basic error checking.
mario
parents: 0
diff changeset
   194
#undef SYM_REF1
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   195
#undef SYM_REF2
69
41cb5b80416e Adding basic error checking.
mario
parents: 0
diff changeset
   196
#undef SYM_REF3
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   197
#undef SYM_REF4
69
41cb5b80416e Adding basic error checking.
mario
parents: 0
diff changeset
   198
#undef SYM_REF5
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   199
#undef SYM_REF6
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   200
680
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   201
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   202
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   203
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   204
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   205
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   206
df783da3ebe2 New visitor classes missing from previous commit.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   207
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   208
#endif /*  _VISITOR_HH */