diff -r c8c48ab075e0 -r a435684a5223 main.cc --- a/main.cc Sat Feb 15 23:58:16 2014 +0000 +++ b/main.cc Sun Feb 16 00:37:40 2014 +0000 @@ -120,8 +120,9 @@ /* Part 1: Concepts and Function Blocks, */ /* Version 1.0 is Official Release */ /******************************************************/ - printf(" s : allow use of safe extensions\n"); - printf(" c : create conversion functions\n"); + printf(" s : allow use of safe extensions (e.g. SAFExxx data types))\n"); + printf(" n : allow use of nested comments\n"); + printf(" c : create conversion functions for enumerated data types\n"); printf("\n"); printf("%s - Copyright (C) 2003-2011 \n" "This program comes with ABSOLUTELY NO WARRANTY!\n" @@ -133,15 +134,21 @@ int main(int argc, char **argv) { symbol_c *tree_root; char * builddir = NULL; - stage1_2_options_t stage1_2_options = {false, false, NULL}; + stage1_2_options_t stage1_2_options; int optres, errflg = 0; int path_len; + /* Default values for the command line options... */ + stage1_2_options.safe_extensions = false; /* allow use of SAFExxx datatypes */ + 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.includedir = NULL; /* Include directory, where included files will be searched for... */ /******************************************/ /* Parse command line options... */ /******************************************/ - while ((optres = getopt(argc, argv, ":hvfscI:T:")) != -1) { + while ((optres = getopt(argc, argv, ":nhvfscI:T:")) != -1) { switch(optres) { case 'h': printusage(argv[0]); @@ -164,6 +171,10 @@ stage1_2_options.conversion_functions = true; break; + case 'n': + stage1_2_options.nested_comments = true; + break; + case 'I': /* NOTE: To improve the usability under windows: * We delete last char's path if it ends with "\".