main.cc
author mjsousa
Wed, 25 Jan 2017 19:50:39 +0000
changeset 1032 7a4b29e25481
parent 1014 a61f8f58f612
permissions -rwxr-xr-x
Fix error locations messed up in previous commit.
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: 202
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: 202
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: 202
diff changeset
     5
 *
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 202
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: 202
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: 202
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: 202
diff changeset
     9
 *  (at your option) any later version.
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 202
diff changeset
    10
 *
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 202
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: 202
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: 202
diff changeset
    13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 202
diff changeset
    14
 *  GNU General Public License for more details.
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 202
diff changeset
    15
 *
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 202
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: 202
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: 202
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: 202
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
 ****************************************************************
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
 *********                                              *********
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    38
 *********   O V E R A L L    A R C H I T E C T U R E   *********
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    39
 *********                                              *********
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
 ****************************************************************
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    42
 ****************************************************************
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    43
 ****************************************************************
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    44
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    45
 The compiler works in 4(+1) stages:
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    46
 Stage 1   - Lexical analyser      - implemented with flex (iec.flex)
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    47
 Stage 2   - Syntax parser         - implemented with bison (iec.y)
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    48
 Stage 3   - Semantics analyser    - not yet implemented
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    49
 Stage 4   - Code generator        - implemented in C++
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    50
 Stage 4+1 - Binary code generator - gcc, javac, etc...
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    51
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
 Data structures passed between stages, in global variables:
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    54
 1->2   : tokens (int), and token values (char *)
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    55
 2->1   : symbol tables (defined in symtable.hh)
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    56
 2->3   : abstract syntax tree (tree of C++ classes, in absyntax.hh file)
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    57
 3->4   : Same as 2->3
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    58
 4->4+1 : file with program in c, java, etc...
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    59
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 compiler works in several passes:
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    62
 Pass 1: executes stages 1 and 2 simultaneously
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    63
 Pass 2: executes stage 3
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    64
 Pass 3: executes stage 4
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    65
 Pass 4: executes stage 4+1
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    66
*/
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    67
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
746
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
    70
#include <stdio.h>
186
f0a41f731cea bug when compiling for windows (missing getopt.h) fixed
greg
parents: 181
diff changeset
    71
#include <getopt.h>
139
668a54686827 added missing includes on some platform (gentoo/gcc-4.3.1)
etisserant
parents: 136
diff changeset
    72
#include <string.h>
746
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
    73
#include <stdlib.h>
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
    74
#include <stdarg.h>
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
    75
#include <iostream>
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
    76
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
    77
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
    78
#include "config/config.h"
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
    79
#include "absyntax/absyntax.hh"
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
    80
#include "absyntax_utils/absyntax_utils.hh"
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
    81
#include "stage1_2/stage1_2.hh"
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
    82
#include "stage3/stage3.hh"
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
    83
#include "stage4/stage4.hh"
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
    84
#include "main.hh"
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
    85
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 315
diff changeset
    86
374
01068ccb73b2 Fix make on system without mercurial installed.
Manuele Conti <conti.ma@alice.it>
parents: 370
diff changeset
    87
#ifndef HGVERSION
746
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
    88
   #define HGVERSION ""
374
01068ccb73b2 Fix make on system without mercurial installed.
Manuele Conti <conti.ma@alice.it>
parents: 370
diff changeset
    89
#endif
350
2c3c4dc34979 Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents: 315
diff changeset
    90
746
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
    91
596
4efb11e44065 Add ERROR_MSG macro && move extract_XXX() functions to constant_folding.cc
Mario de Sousa <msousa@fe.up.pt>
parents: 521
diff changeset
    92
4efb11e44065 Add ERROR_MSG macro && move extract_XXX() functions to constant_folding.cc
Mario de Sousa <msousa@fe.up.pt>
parents: 521
diff changeset
    93
void error_exit(const char *file_name, int line_no, const char *errmsg, ...) {
4efb11e44065 Add ERROR_MSG macro && move extract_XXX() functions to constant_folding.cc
Mario de Sousa <msousa@fe.up.pt>
parents: 521
diff changeset
    94
  va_list argptr;
4efb11e44065 Add ERROR_MSG macro && move extract_XXX() functions to constant_folding.cc
Mario de Sousa <msousa@fe.up.pt>
parents: 521
diff changeset
    95
  va_start(argptr, errmsg); /* second argument is last fixed pamater of error_exit() */
4efb11e44065 Add ERROR_MSG macro && move extract_XXX() functions to constant_folding.cc
Mario de Sousa <msousa@fe.up.pt>
parents: 521
diff changeset
    96
4efb11e44065 Add ERROR_MSG macro && move extract_XXX() functions to constant_folding.cc
Mario de Sousa <msousa@fe.up.pt>
parents: 521
diff changeset
    97
  fprintf(stderr, "\nInternal compiler error in file %s at line %d", file_name, line_no);
4efb11e44065 Add ERROR_MSG macro && move extract_XXX() functions to constant_folding.cc
Mario de Sousa <msousa@fe.up.pt>
parents: 521
diff changeset
    98
  if (errmsg != NULL) {
4efb11e44065 Add ERROR_MSG macro && move extract_XXX() functions to constant_folding.cc
Mario de Sousa <msousa@fe.up.pt>
parents: 521
diff changeset
    99
    fprintf(stderr, ": ");
4efb11e44065 Add ERROR_MSG macro && move extract_XXX() functions to constant_folding.cc
Mario de Sousa <msousa@fe.up.pt>
parents: 521
diff changeset
   100
    vfprintf(stderr, errmsg, argptr);
4efb11e44065 Add ERROR_MSG macro && move extract_XXX() functions to constant_folding.cc
Mario de Sousa <msousa@fe.up.pt>
parents: 521
diff changeset
   101
  } else {
4efb11e44065 Add ERROR_MSG macro && move extract_XXX() functions to constant_folding.cc
Mario de Sousa <msousa@fe.up.pt>
parents: 521
diff changeset
   102
    fprintf(stderr, ".");
4efb11e44065 Add ERROR_MSG macro && move extract_XXX() functions to constant_folding.cc
Mario de Sousa <msousa@fe.up.pt>
parents: 521
diff changeset
   103
  }
4efb11e44065 Add ERROR_MSG macro && move extract_XXX() functions to constant_folding.cc
Mario de Sousa <msousa@fe.up.pt>
parents: 521
diff changeset
   104
  fprintf(stderr, "\n");
4efb11e44065 Add ERROR_MSG macro && move extract_XXX() functions to constant_folding.cc
Mario de Sousa <msousa@fe.up.pt>
parents: 521
diff changeset
   105
  va_end(argptr);
4efb11e44065 Add ERROR_MSG macro && move extract_XXX() functions to constant_folding.cc
Mario de Sousa <msousa@fe.up.pt>
parents: 521
diff changeset
   106
    
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   107
  exit(EXIT_FAILURE);
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
static void printusage(const char *cmd) {
878
89eb85bab58f Make generation of #line directives optional.
mjsousa
parents: 873
diff changeset
   112
  printf("\nsyntax: %s [<options>] [-O <output_options>] [-I <include_directory>] [-T <target_directory>] <input_file>\n", cmd);
89eb85bab58f Make generation of #line directives optional.
mjsousa
parents: 873
diff changeset
   113
  printf(" -h : show this help message\n");
89eb85bab58f Make generation of #line directives optional.
mjsousa
parents: 873
diff changeset
   114
  printf(" -v : print version number\n");  
89eb85bab58f Make generation of #line directives optional.
mjsousa
parents: 873
diff changeset
   115
  printf(" -f : display full token location on error messages\n");
956
513809fbfaf9 Make use of pre-parser a command line option.
mjsousa
parents: 946
diff changeset
   116
  printf(" -p : allow use of forward references                (a non-standard extension?)\n");  
946
c012a64dc2fa Make the relaxed datatype model a runtime option (off by default)
mjsousa
parents: 934
diff changeset
   117
  printf(" -l : use a relaxed datatype equivalence model       (a non-standard extension?)\n");  
c012a64dc2fa Make the relaxed datatype model a runtime option (off by default)
mjsousa
parents: 934
diff changeset
   118
  printf(" -s : allow use of safe datatypes (SAFEBOOL, etc.)   (defined in PLCOpen Safety)\n"); // PLCopen TC5 "Safety Software Technical Specification - Part 1" v1.0
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 980
diff changeset
   119
  printf(" -n : allow use of nested comments                   (an IEC 61131-3 v3 feature)\n");
933
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 932
diff changeset
   120
  printf(" -r : allow use of references (REF_TO, REF, ^, NULL) (an IEC 61131-3 v3 feature)\n");
932
061824c45a5b Add support for REF_TO inside arrays and structs (a non-standard feature!)
mjsousa
parents: 924
diff changeset
   121
  printf(" -R : allow use of REF_TO ANY datatypes              (a non-standard extension!)\n");
061824c45a5b Add support for REF_TO inside arrays and structs (a non-standard feature!)
mjsousa
parents: 924
diff changeset
   122
  printf("        as well as REF_TO in ARRAYs and STRUCTs      (a non-standard extension!)\n");
980
9ed5aff159db Make support for use of variables in array size declarations a command line option (off by default)
mjsousa
parents: 959
diff changeset
   123
  printf(" -a : allow use of non-literals in array size limits (a non-standard extension!)\n");
1012
1f2af384fb1f Add support for non standard feature: allow POUs with no in, out and inout parameters
mjsousa
parents: 1011
diff changeset
   124
  printf(" -i : allow POUs with no in out and inout parameters (a non-standard extension!)\n");
1014
a61f8f58f612 Add support for non-standard VOID datatype. May ony be used to define functions returning VOID.
mjsousa
parents: 1012
diff changeset
   125
  printf(" -b : allow functions returning VOID                 (a non-standard extension!)\n");
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 980
diff changeset
   126
  printf(" -e : disable generation of implicit EN and ENO parameters.\n");
878
89eb85bab58f Make generation of #line directives optional.
mjsousa
parents: 873
diff changeset
   127
  printf(" -c : create conversion functions for enumerated data types\n");
89eb85bab58f Make generation of #line directives optional.
mjsousa
parents: 873
diff changeset
   128
  printf(" -O : options for output (code generation) stage. Available options for %s are...\n", cmd);
1012
1f2af384fb1f Add support for non standard feature: allow POUs with no in, out and inout parameters
mjsousa
parents: 1011
diff changeset
   129
  runtime_options.allow_missing_var_in    = false; /* disable: allow definition and invocation of POUs with no input, output and in_out parameters! */
878
89eb85bab58f Make generation of #line directives optional.
mjsousa
parents: 873
diff changeset
   130
  stage4_print_options();
261
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 202
diff changeset
   131
  printf("\n");
873
dea39ef02847 Add limited support for the REF() operator (defined in v3 of IEC 61131-3)
mjsousa
parents: 867
diff changeset
   132
  printf("%s - Copyright (C) 2003-2014 \n"
261
db2ad6541d92 Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents: 202
diff changeset
   133
         "This program comes with ABSOLUTELY NO WARRANTY!\n"
362
6482d83fadee Add print version command line option.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   134
         "This is free software licensed under GPL v3, and you are welcome to redistribute it under the conditions specified by this license.\n", PACKAGE_NAME);
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   135
}
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   136
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   137
946
c012a64dc2fa Make the relaxed datatype model a runtime option (off by default)
mjsousa
parents: 934
diff changeset
   138
/* declare the global options variable */
c012a64dc2fa Make the relaxed datatype model a runtime option (off by default)
mjsousa
parents: 934
diff changeset
   139
runtime_options_t runtime_options;
c012a64dc2fa Make the relaxed datatype model a runtime option (off by default)
mjsousa
parents: 934
diff changeset
   140
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   141
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   142
int main(int argc, char **argv) {
959
8bfcc8e62bd6 Fix C code generation when forward references (-p command line option) is on.
mjsousa
parents: 956
diff changeset
   143
  symbol_c *tree_root, *ordered_tree_root;
46
fc1b78ea6d84 Adding support for generating files into an user-defined folder
lbessard
parents: 0
diff changeset
   144
  char * builddir = NULL;
177
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   145
  int optres, errflg = 0;
521
3127ddda2be2 Improve usability command line under windows.
Conti Manuele <conti.ma@alice.it>
parents: 516
diff changeset
   146
  int path_len;
746
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
   147
867
a435684a5223 Add option to control support for nested comments (default is off, as defined in IEC 61131-3 v2)
mjsousa
parents: 746
diff changeset
   148
  /* Default values for the command line options... */
1014
a61f8f58f612 Add support for non-standard VOID datatype. May ony be used to define functions returning VOID.
mjsousa
parents: 1012
diff changeset
   149
  runtime_options.allow_void_datatype     = false; /* disable: allow declaration of functions returning VOID  */
1012
1f2af384fb1f Add support for non standard feature: allow POUs with no in, out and inout parameters
mjsousa
parents: 1011
diff changeset
   150
  runtime_options.allow_missing_var_in    = false; /* disable: allow definition and invocation of POUs with no input, output and in_out parameters! */
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 980
diff changeset
   151
  runtime_options.disable_implicit_en_eno = false; /* disable: do not generate EN and ENO parameters */
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 980
diff changeset
   152
  runtime_options.pre_parsing             = false; /* disable: allow use of forward references (run pre-parsing phase before the definitive parsing phase that builds the AST) */
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 980
diff changeset
   153
  runtime_options.safe_extensions         = false; /* disable: allow use of SAFExxx datatypes */
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 980
diff changeset
   154
  runtime_options.full_token_loc          = false; /* disable: error messages specify full token location */
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 980
diff changeset
   155
  runtime_options.conversion_functions    = false; /* disable: create a conversion function for derived datatype */
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 980
diff changeset
   156
  runtime_options.nested_comments         = false; /* disable: Allow the use of nested comments. */
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 980
diff changeset
   157
  runtime_options.ref_standard_extensions = false; /* disable: Allow the use of REFerences (keywords REF_TO, REF, DREF, ^, NULL). */
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 980
diff changeset
   158
  runtime_options.ref_nonstand_extensions = false; /* disable: Allow the use of non-standard extensions to REF_TO datatypes: REF_TO ANY, and REF_TO in struct elements! */
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 980
diff changeset
   159
  runtime_options.nonliteral_in_array_size= false; /* disable: Allow the use of constant non-literals when specifying size of arrays (ARRAY [1..max] OF INT) */
946
c012a64dc2fa Make the relaxed datatype model a runtime option (off by default)
mjsousa
parents: 934
diff changeset
   160
  runtime_options.includedir              = NULL;  /* Include directory, where included files will be searched for... */
c012a64dc2fa Make the relaxed datatype model a runtime option (off by default)
mjsousa
parents: 934
diff changeset
   161
c012a64dc2fa Make the relaxed datatype model a runtime option (off by default)
mjsousa
parents: 934
diff changeset
   162
  /* Default values for the command line options... */
c012a64dc2fa Make the relaxed datatype model a runtime option (off by default)
mjsousa
parents: 934
diff changeset
   163
  runtime_options.relaxed_datatype_model    = false; /* by default use the strict datatype equivalence model */
c012a64dc2fa Make the relaxed datatype model a runtime option (off by default)
mjsousa
parents: 934
diff changeset
   164
  
181
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 179
diff changeset
   165
  /******************************************/
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 179
diff changeset
   166
  /*   Parse command line options...        */
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 179
diff changeset
   167
  /******************************************/
1014
a61f8f58f612 Add support for non-standard VOID datatype. May ony be used to define functions returning VOID.
mjsousa
parents: 1012
diff changeset
   168
  while ((optres = getopt(argc, argv, ":nehvfplsrRabicI:T:O:")) != -1) {
177
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   169
    switch(optres) {
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   170
    case 'h':
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   171
      printusage(argv[0]);
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   172
      return 0;
362
6482d83fadee Add print version command line option.
Mario de Sousa <msousa@fe.up.pt>
parents: 350
diff changeset
   173
    case 'v':
878
89eb85bab58f Make generation of #line directives optional.
mjsousa
parents: 873
diff changeset
   174
      fprintf(stdout, "%s version %s\n" "changeset id: %s\n", PACKAGE_NAME, PACKAGE_VERSION, HGVERSION);      
746
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
   175
      return 0;
980
9ed5aff159db Make support for use of variables in array size declarations a command line option (off by default)
mjsousa
parents: 959
diff changeset
   176
    case 'l': runtime_options.relaxed_datatype_model   = true;  break;
9ed5aff159db Make support for use of variables in array size declarations a command line option (off by default)
mjsousa
parents: 959
diff changeset
   177
    case 'p': runtime_options.pre_parsing              = true;  break;
9ed5aff159db Make support for use of variables in array size declarations a command line option (off by default)
mjsousa
parents: 959
diff changeset
   178
    case 'f': runtime_options.full_token_loc           = true;  break;
9ed5aff159db Make support for use of variables in array size declarations a command line option (off by default)
mjsousa
parents: 959
diff changeset
   179
    case 's': runtime_options.safe_extensions          = true;  break;
9ed5aff159db Make support for use of variables in array size declarations a command line option (off by default)
mjsousa
parents: 959
diff changeset
   180
    case 'R': runtime_options.ref_standard_extensions  = true; /* use of REF_TO ANY implies activating support for REF extensions! */
9ed5aff159db Make support for use of variables in array size declarations a command line option (off by default)
mjsousa
parents: 959
diff changeset
   181
              runtime_options.ref_nonstand_extensions  = true;  break;
9ed5aff159db Make support for use of variables in array size declarations a command line option (off by default)
mjsousa
parents: 959
diff changeset
   182
    case 'r': runtime_options.ref_standard_extensions  = true;  break;
9ed5aff159db Make support for use of variables in array size declarations a command line option (off by default)
mjsousa
parents: 959
diff changeset
   183
    case 'a': runtime_options.nonliteral_in_array_size = true;  break;
1014
a61f8f58f612 Add support for non-standard VOID datatype. May ony be used to define functions returning VOID.
mjsousa
parents: 1012
diff changeset
   184
    case 'b': runtime_options.allow_void_datatype      = true;  break;
1012
1f2af384fb1f Add support for non standard feature: allow POUs with no in, out and inout parameters
mjsousa
parents: 1011
diff changeset
   185
    case 'i': runtime_options.allow_missing_var_in     = true;  break;
980
9ed5aff159db Make support for use of variables in array size declarations a command line option (off by default)
mjsousa
parents: 959
diff changeset
   186
    case 'c': runtime_options.conversion_functions     = true;  break;
9ed5aff159db Make support for use of variables in array size declarations a command line option (off by default)
mjsousa
parents: 959
diff changeset
   187
    case 'n': runtime_options.nested_comments          = true;  break;
1011
76175defb87b Add option to not add the EN and ENO parameters to every function and FB (generated C code becomes smaller, and uses less memory for function invocations)
mjsousa
parents: 980
diff changeset
   188
    case 'e': runtime_options.disable_implicit_en_eno  = true;  break;
177
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   189
    case 'I':
521
3127ddda2be2 Improve usability command line under windows.
Conti Manuele <conti.ma@alice.it>
parents: 516
diff changeset
   190
      /* NOTE: To improve the usability under windows:
3127ddda2be2 Improve usability command line under windows.
Conti Manuele <conti.ma@alice.it>
parents: 516
diff changeset
   191
       *       We delete last char's path if it ends with "\".
3127ddda2be2 Improve usability command line under windows.
Conti Manuele <conti.ma@alice.it>
parents: 516
diff changeset
   192
       *       In this way compiler front-end accepts paths with or without
3127ddda2be2 Improve usability command line under windows.
Conti Manuele <conti.ma@alice.it>
parents: 516
diff changeset
   193
       *       slash terminator.
3127ddda2be2 Improve usability command line under windows.
Conti Manuele <conti.ma@alice.it>
parents: 516
diff changeset
   194
       */
3127ddda2be2 Improve usability command line under windows.
Conti Manuele <conti.ma@alice.it>
parents: 516
diff changeset
   195
      path_len = strlen(optarg) - 1;
3127ddda2be2 Improve usability command line under windows.
Conti Manuele <conti.ma@alice.it>
parents: 516
diff changeset
   196
      if (optarg[path_len] == '\\') optarg[path_len]= '\0';
946
c012a64dc2fa Make the relaxed datatype model a runtime option (off by default)
mjsousa
parents: 934
diff changeset
   197
      runtime_options.includedir = optarg;
177
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   198
      break;
179
a4eb4fd6b0d6 Target Directory not parsed in command line fixed
lbessard
parents: 178
diff changeset
   199
    case 'T':
521
3127ddda2be2 Improve usability command line under windows.
Conti Manuele <conti.ma@alice.it>
parents: 516
diff changeset
   200
      /* NOTE: see note above */
3127ddda2be2 Improve usability command line under windows.
Conti Manuele <conti.ma@alice.it>
parents: 516
diff changeset
   201
      path_len = strlen(optarg) - 1;
3127ddda2be2 Improve usability command line under windows.
Conti Manuele <conti.ma@alice.it>
parents: 516
diff changeset
   202
      if (optarg[path_len] == '\\') optarg[path_len]= '\0';
179
a4eb4fd6b0d6 Target Directory not parsed in command line fixed
lbessard
parents: 178
diff changeset
   203
      builddir = optarg;
a4eb4fd6b0d6 Target Directory not parsed in command line fixed
lbessard
parents: 178
diff changeset
   204
      break;
878
89eb85bab58f Make generation of #line directives optional.
mjsousa
parents: 873
diff changeset
   205
    case 'O':
89eb85bab58f Make generation of #line directives optional.
mjsousa
parents: 873
diff changeset
   206
      if (stage4_parse_options(optarg) < 0) errflg++;
89eb85bab58f Make generation of #line directives optional.
mjsousa
parents: 873
diff changeset
   207
      break;
89eb85bab58f Make generation of #line directives optional.
mjsousa
parents: 873
diff changeset
   208
    case ':':       /* -I, -T, or -O without operand */
177
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   209
      fprintf(stderr, "Option -%c requires an operand\n", optopt);
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   210
      errflg++;
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   211
      break;
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   212
    case '?':
181
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 179
diff changeset
   213
      fprintf(stderr, "Unrecognized option: -%c\n", optopt);
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 179
diff changeset
   214
      errflg++;
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 179
diff changeset
   215
      break;
177
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   216
    default:
181
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 179
diff changeset
   217
      fprintf(stderr, "Unknown error while parsing command line options.");
177
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   218
      errflg++;
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   219
      break;
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   220
    }
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   221
  }
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   222
177
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   223
  if (optind == argc) {
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   224
    fprintf(stderr, "Missing input file\n");
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   225
    errflg++;
136
32bd7ef40897 Adding some improvements:
lbessard
parents: 47
diff changeset
   226
  }
32bd7ef40897 Adding some improvements:
lbessard
parents: 47
diff changeset
   227
177
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   228
  if (optind > argc) {
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   229
    fprintf(stderr, "Too many input files\n");
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   230
    errflg++;
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   231
  }
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   232
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents: 139
diff changeset
   233
  if (errflg) {
746
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
   234
    printusage(argv[0]);
c7219a37cc39 Add conversion functions option.
Manuele Conti <conti.ma@alice.it>
parents: 596
diff changeset
   235
    return EXIT_FAILURE;
136
32bd7ef40897 Adding some improvements:
lbessard
parents: 47
diff changeset
   236
  }
32bd7ef40897 Adding some improvements:
lbessard
parents: 47
diff changeset
   237
32bd7ef40897 Adding some improvements:
lbessard
parents: 47
diff changeset
   238
181
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 179
diff changeset
   239
  /***************************/
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 179
diff changeset
   240
  /*   Run the compiler...   */
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 179
diff changeset
   241
  /***************************/
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   242
  /* 1st Pass */
946
c012a64dc2fa Make the relaxed datatype model a runtime option (off by default)
mjsousa
parents: 934
diff changeset
   243
  if (stage1_2(argv[optind], &tree_root) < 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
   244
    return EXIT_FAILURE;
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   245
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   246
  /* 2nd Pass */
315
c62a4078f269 Allow use of ENO keyword in structured variable field selector.
Mario de Sousa <msousa@fe.up.pt>
parents: 279
diff changeset
   247
    /* basically loads some symbol tables to speed up look ups later on */
c62a4078f269 Allow use of ENO keyword in structured variable field selector.
Mario de Sousa <msousa@fe.up.pt>
parents: 279
diff changeset
   248
  absyntax_utils_init(tree_root);  
c62a4078f269 Allow use of ENO keyword in structured variable field selector.
Mario de Sousa <msousa@fe.up.pt>
parents: 279
diff changeset
   249
    /* moved to bison, although it could perfectly well still be here instead of in bison code. */
c62a4078f269 Allow use of ENO keyword in structured variable field selector.
Mario de Sousa <msousa@fe.up.pt>
parents: 279
diff changeset
   250
  //add_en_eno_param_decl_c::add_to(tree_root);
c62a4078f269 Allow use of ENO keyword in structured variable field selector.
Mario de Sousa <msousa@fe.up.pt>
parents: 279
diff changeset
   251
946
c012a64dc2fa Make the relaxed datatype model a runtime option (off by default)
mjsousa
parents: 934
diff changeset
   252
  /* Do semantic verification of code */
959
8bfcc8e62bd6 Fix C code generation when forward references (-p command line option) is on.
mjsousa
parents: 956
diff changeset
   253
  if (stage3(tree_root, &ordered_tree_root) < 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
   254
    return EXIT_FAILURE;
202
da1a8186f86f Initial (very rough) version of semantic checker (stage3)
Catarina Boucinha <ccb@fe.up.pt>
parents: 186
diff changeset
   255
  
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   256
  /* 3rd Pass */
959
8bfcc8e62bd6 Fix C code generation when forward references (-p command line option) is on.
mjsousa
parents: 956
diff changeset
   257
  if (stage4(ordered_tree_root, builddir) < 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
   258
    return EXIT_FAILURE;
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   259
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   260
  /* 4th Pass */
315
c62a4078f269 Allow use of ENO keyword in structured variable field selector.
Mario de Sousa <msousa@fe.up.pt>
parents: 279
diff changeset
   261
  /* Call gcc, g++, or whatever... */
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   262
  /* Currently implemented in the Makefile! */
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   263
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   264
  return 0;
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   265
}
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   266
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
   267