2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
3 ** See ../LICENSE for license information.
9 extern /*@owned@*/ fileloc g_currentloc;
11 /* stream for error messages */
12 extern /*:open:*/ FILE *g_msgstream;
15 /* This macro is defined by flex. */
16 /*@constant external int ECHO@*/
22 extern /*@dependent@*/ /*:open:*/ FILE *yyin;
23 extern /*@dependent@*/ /*:open:*/ FILE *yyout;
31 extern /*@observer@*/ cstring g_codeFile;
32 extern int g_codeLine;
34 extern /*@observer@*/ cstring g_prevCodeFile;
35 extern int g_prevCodeLine;
37 extern /*@observer@*/ char *g_localSpecPath;
40 extern /*@only@*/ cstring g_currentSpec;
41 extern /*@null@*/ /*@only@*/ char *g_currentSpecName;
44 extern void setCodePoint (void);
45 # define setCodePoint() \
46 (g_prevCodeFile = g_codeFile, g_prevCodeLine = g_codeLine, \
47 g_codeFile = cstring_makeLiteralTemp (__FILE__), g_codeLine = __LINE__)
49 extern void printCodePoint (void);
51 extern fileId currentFile (void) /*@globals g_currentloc; @*/ ;
52 # define currentFile() (fileloc_fileId (g_currentloc))
54 extern int currentColumn (void) /*@globals g_currentloc; @*/ ;
55 # define currentColumn() (fileloc_column(g_currentloc))
57 extern void incColumn (void)
58 /*@globals g_currentloc; @*/
59 /*@modifies g_currentloc@*/ ;
60 # define incColumn() (fileloc_incColumn(g_currentloc))
62 extern void decColumn (void)
63 /*@globals g_currentloc; @*/
64 /*@modifies g_currentloc@*/ ;
65 # define decColumn() (fileloc_addColumn(g_currentloc, -1))
67 extern void incLine (void)
68 /*@globals g_currentloc; @*/
69 /*@modifies g_currentloc; @*/ ;
70 # define incLine() (fileloc_nextLine(g_currentloc))
72 extern void decLine (void)
73 /*@globals g_currentloc; @*/
74 /*@modifies g_currentloc; @*/ ;
75 # define decLine() (fileloc_addLine (g_currentloc, -1))
77 extern void beginLine (void)
78 /*@globals g_currentloc; @*/
79 /*@modifies g_currentloc; @*/ ;
80 # define beginLine() (fileloc_setColumn(g_currentloc, 1))
82 extern void addColumn (int p_n)
83 /*@globals g_currentloc; @*/
84 /*@modifies g_currentloc; @*/ ;
85 # define addColumn(n) (fileloc_addColumn(g_currentloc, n))
87 extern void setLine (int p_n)
88 /*@globals fileloc g_currentloc; @*/
89 /*@modifies g_currentloc; @*/ ;
90 # define setLine(n) (fileloc_setLineno(g_currentloc, n))
92 extern void setColumn (int p_n)
93 /*@globals fileloc g_currentloc; @*/
94 /*@modifies g_currentloc; @*/ ;
95 # define setColumn(n) (fileloc_setColumn(g_currentloc, n))
98 extern void setSpecFileId (fileId p_s)
99 /*@globals fileloc g_currentloc; @*/
100 /*@modifies g_currentloc; @*/ ;
101 # define setSpecFileId(s) \
102 (fileloc_reallyFree (g_currentloc), g_currentloc = fileloc_createSpec (s, 1, 1))
105 extern void setFileLine (fileId p_s, int p_line)
106 /*@globals fileloc g_currentloc; @*/
107 /*@modifies g_currentloc; @*/ ;
108 # define setFileLine(s, line) \
109 (context_setFilename(s, line))
111 /*@constant int PRINTBREADTH;@*/ /* For printing lists. Should be parameter... */ /*@i32@*/
112 # define PRINTBREADTH 3
115 # error "Multiple include"