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;
28 extern int yywrap (void) /*@*/ ;
35 extern /*@observer@*/ cstring g_codeFile;
36 extern int g_codeLine;
38 extern /*@observer@*/ cstring g_prevCodeFile;
39 extern int g_prevCodeLine;
41 extern /*@observer@*/ char *g_localSpecPath;
44 extern /*@only@*/ cstring g_currentSpec;
45 extern /*@null@*/ /*@only@*/ char *g_currentSpecName;
48 extern void setCodePoint (void);
49 # define setCodePoint() \
50 (g_prevCodeFile = g_codeFile, g_prevCodeLine = g_codeLine, \
51 g_codeFile = cstring_makeLiteralTemp (__FILE__), g_codeLine = __LINE__)
53 extern void printCodePoint (void);
55 extern fileId currentFile (void) /*@globals g_currentloc; @*/ ;
56 # define currentFile() (fileloc_fileId (g_currentloc))
58 extern int currentColumn (void) /*@globals g_currentloc; @*/ ;
59 # define currentColumn() (fileloc_column(g_currentloc))
61 extern void incColumn (void)
62 /*@globals g_currentloc; @*/
63 /*@modifies g_currentloc@*/ ;
64 # define incColumn() (fileloc_incColumn(g_currentloc))
66 extern void decColumn (void)
67 /*@globals g_currentloc; @*/
68 /*@modifies g_currentloc@*/ ;
69 # define decColumn() (fileloc_addColumn(g_currentloc, -1))
71 extern void incLine (void)
72 /*@globals g_currentloc; @*/
73 /*@modifies g_currentloc; @*/ ;
74 # define incLine() (fileloc_nextLine(g_currentloc))
76 extern void decLine (void)
77 /*@globals g_currentloc; @*/
78 /*@modifies g_currentloc; @*/ ;
79 # define decLine() (fileloc_addLine (g_currentloc, -1))
81 extern void beginLine (void)
82 /*@globals g_currentloc; @*/
83 /*@modifies g_currentloc; @*/ ;
84 # define beginLine() (fileloc_setColumn(g_currentloc, 1))
86 extern void addColumn (int p_n)
87 /*@globals g_currentloc; @*/
88 /*@modifies g_currentloc; @*/ ;
89 # define addColumn(n) (fileloc_addColumn(g_currentloc, n))
91 extern void setLine (int p_n)
92 /*@globals fileloc g_currentloc; @*/
93 /*@modifies g_currentloc; @*/ ;
94 # define setLine(n) (fileloc_setLineno(g_currentloc, n))
96 extern void setColumn (int p_n)
97 /*@globals fileloc g_currentloc; @*/
98 /*@modifies g_currentloc; @*/ ;
99 # define setColumn(n) (fileloc_setColumn(g_currentloc, n))
102 extern void setSpecFileId (fileId p_s)
103 /*@globals fileloc g_currentloc; @*/
104 /*@modifies g_currentloc; @*/ ;
105 # define setSpecFileId(s) \
106 (fileloc_reallyFree (g_currentloc), g_currentloc = fileloc_createSpec (s, 1, 1))
109 extern void setFileLine (fileId p_s, int p_line)
110 /*@globals fileloc g_currentloc; @*/
111 /*@modifies g_currentloc; @*/ ;
112 # define setFileLine(s, line) \
113 (context_setFilename(s, line))
115 /*@constant int PRINTBREADTH;@*/ /* For printing lists. Should be parameter... */ /*@i32@*/
116 # define PRINTBREADTH 3
119 # error "Multiple include"