main.cc
changeset 873 dea39ef02847
parent 867 a435684a5223
child 878 89eb85bab58f
--- a/main.cc	Mon Feb 24 22:00:55 2014 +0000
+++ b/main.cc	Sun Mar 02 16:42:56 2014 +0000
@@ -121,10 +121,11 @@
       /* Version 1.0 is Official Release                    */
       /******************************************************/
   printf("  s : allow use of safe extensions (e.g. SAFExxx data types))\n");
-  printf("  n : allow use of nested comments\n");
+  printf("  n : allow use of nested comments (an IEC 61131-3 v3 feature)\n");
+  printf("  r : allow use of REF() operator  (an IEC 61131-3 v3 feature)\n");
   printf("  c : create conversion functions for enumerated data types\n");
   printf("\n");
-  printf("%s - Copyright (C) 2003-2011 \n"
+  printf("%s - Copyright (C) 2003-2014 \n"
          "This program comes with ABSOLUTELY NO WARRANTY!\n"
          "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);
 }
@@ -143,12 +144,13 @@
   stage1_2_options.full_token_loc       = false; /* error messages specify full token location */
   stage1_2_options.conversion_functions = false; /* Create a conversion function for derived datatype */
   stage1_2_options.nested_comments      = false; /* Allow the use of nested comments. */
+  stage1_2_options.ref_operator         = false; /* Allow the use of REF() operator. */
   stage1_2_options.includedir           = NULL;  /* Include directory, where included files will be searched for... */
 
   /******************************************/
   /*   Parse command line options...        */
   /******************************************/
-  while ((optres = getopt(argc, argv, ":nhvfscI:T:")) != -1) {
+  while ((optres = getopt(argc, argv, ":nhvfrscI:T:")) != -1) {
     switch(optres) {
     case 'h':
       printusage(argv[0]);
@@ -167,6 +169,10 @@
       stage1_2_options.safe_extensions = true;
       break;
 
+    case 'r':
+      stage1_2_options.ref_operator = true;
+      break;
+
     case 'c':
       stage1_2_options.conversion_functions = true;
       break;