#include "constants.h"
#include "utils.h"
-#define PARSER_VERSION "1.3-???"
-
tree root; /* The root of the built syntax tree. */
list Lnil;
BOOLEAN nonstandardFlag = FALSE; /* Set if non-std Haskell extensions to be used. */
-BOOLEAN acceptPrim = FALSE; /* Set if Int#, etc., may be used */
-BOOLEAN haskell1_2Flag = FALSE; /* Set if we are compiling for 1.2 */
BOOLEAN etags = FALSE; /* Set if we're parsing only to produce tags. */
BOOLEAN hashIds = FALSE; /* Set if Identifiers should be hashed. */
BOOLEAN ignoreSCC = TRUE; /* Set if we ignore/filter scc expressions. */
+BOOLEAN warnSCC = FALSE; /* Set if we want to inform the user what _scc_s are
+ being ignored. */
-static BOOLEAN verbose = FALSE; /* Set for verbose messages. */
-
-/* Forward decls */
-static void who_am_i PROTO((void));
-
/**********************************************************************
* *
* *
{
BOOLEAN keep_munging_option = FALSE;
- argc--, argv++;
-
while (argc > 0 && argv[0][0] == '-') {
keep_munging_option = TRUE;
while (keep_munging_option && *++*argv != '\0') {
switch(**argv) {
- case 'v':
- who_am_i(); /* identify myself */
- verbose = TRUE;
- break;
-
- case 'N':
- nonstandardFlag = TRUE;
- acceptPrim = TRUE;
- break;
-
- case '2':
- haskell1_2Flag = TRUE;
- break;
-
- case 'S':
- ignoreSCC = FALSE;
- break;
-
case 'D':
#ifdef HSP_DEBUG
{ extern int yydebug;
#endif
break;
+ case 'E':
+ etags = TRUE;
+ break;
+
/* -Hn -- Use Hash Table, Size n (if given) */
case 'H':
hashIds = TRUE;
if(*(*argv+1)!= '\0')
hash_table_size = atoi(*argv+1);
break;
- case 'E':
- etags = TRUE;
+ case 'N':
+ nonstandardFlag = TRUE;
+ break;
+
+ case 'S':
+ ignoreSCC = FALSE;
+ break;
+
+ case 'W':
+ warnSCC = TRUE;
break;
+
}
}
argc--, argv++;
fprintf(stderr, "Cannot open %s.\n", argv[1]);
exit(1);
}
-
- if (verbose) {
- fprintf(stderr,"Hash Table Contains %d entries\n",hash_table_size);
- if(acceptPrim)
- fprintf(stderr,"Allowing special syntax for Unboxed Values\n");
- }
}
void
exit(1);
}
-static void
-who_am_i(void)
-{
- fprintf(stderr,"Glasgow Haskell parser, version %s\n", PARSER_VERSION);
-}
-
list
lconc(l1, l2)
list l1;