2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
3 ** See ../LICENSE for license information.
9 extern /*@owned@*/ fileloc g_currentloc;
12 ** All the streams are unchecked for now.
15 /* stream for warning messages */
16 /*@unchecked@*/ extern /*@relnull@*/ /*@dependent@*/ /*:open:*/ FILE *g_warningstream;
18 /* stream for status messages */
19 /*@unchecked@*/ extern /*@relnull@*/ /*@dependent@*/ /*:open:*/ FILE *g_messagestream;
21 /* stream for error messages */
22 /*@unchecked@*/ extern /*@relnull@*/ /*@dependent@*/ /*:open:*/ FILE *g_errorstream;
24 /* stream for error messages */
25 /*@unchecked@*/ extern /*@null@*/ /*@dependent@*/ /*:open:*/ FILE *g_csvstream;
28 /* This macro is defined by flex. */
29 /*@constant external int ECHO@*/
35 /*@-declundef@*/ /* Might not process grammar files */
36 extern /*@dependent@*/ /*@open@*/ FILE *yyin;
37 extern /*@dependent@*/ /*@open@*/ /*@unused@*/ FILE *yyout;
38 extern /*@unused@*/ int yyleng;
46 extern /*@observer@*/ cstring g_codeFile;
47 extern int g_codeLine;
49 extern /*@observer@*/ cstring g_prevCodeFile;
50 extern int g_prevCodeLine;
52 extern /*@observer@*/ char *g_localSpecPath;
54 extern /*@only@*/ cstring g_currentSpec;
55 extern /*@null@*/ /*@only@*/ char *g_currentSpecName;
57 extern void setCodePoint (void);
58 # define setCodePoint() \
59 (g_prevCodeFile = g_codeFile, g_prevCodeLine = g_codeLine, \
60 g_codeFile = cstring_makeLiteralTemp (__FILE__), g_codeLine = __LINE__)
62 extern void printCodePoint (void);
64 extern fileId currentFile (void) /*@globals g_currentloc; @*/ ;
65 # define currentFile() (fileloc_fileId (g_currentloc))
67 extern int currentColumn (void) /*@globals g_currentloc; @*/ ;
68 # define currentColumn() (fileloc_column(g_currentloc))
70 extern void incColumn (void)
71 /*@globals g_currentloc; @*/
72 /*@modifies g_currentloc@*/ ;
73 # define incColumn() (fileloc_incColumn(g_currentloc))
75 extern void decColumn (void)
76 /*@globals g_currentloc; @*/
77 /*@modifies g_currentloc@*/ ;
78 # define decColumn() (fileloc_addColumn(g_currentloc, -1))
80 extern void incLine (void)
81 /*@globals g_currentloc; @*/
82 /*@modifies g_currentloc; @*/ ;
83 # define incLine() (fileloc_nextLine(g_currentloc))
85 extern void decLine (void)
86 /*@globals g_currentloc; @*/
87 /*@modifies g_currentloc; @*/ ;
88 # define decLine() (fileloc_addLine (g_currentloc, -1))
90 extern void beginLine (void)
91 /*@globals g_currentloc; @*/
92 /*@modifies g_currentloc; @*/ ;
93 # define beginLine() (fileloc_setColumn(g_currentloc, 1))
95 extern void addColumn (int p_n)
96 /*@globals g_currentloc; @*/
97 /*@modifies g_currentloc; @*/ ;
98 # define addColumn(n) (fileloc_addColumn(g_currentloc, n))
100 extern void setLine (int p_n)
101 /*@globals fileloc g_currentloc; @*/
102 /*@modifies g_currentloc; @*/ ;
103 # define setLine(n) (fileloc_setLineno(g_currentloc, n))
105 extern void setColumn (int p_n)
106 /*@globals fileloc g_currentloc; @*/
107 /*@modifies g_currentloc; @*/ ;
108 # define setColumn(n) (fileloc_setColumn(g_currentloc, n))
110 extern void setSpecFileId (fileId p_s)
111 /*@globals fileloc g_currentloc; @*/
112 /*@modifies g_currentloc; @*/ ;
113 # define setSpecFileId(s) \
114 (fileloc_reallyFree (g_currentloc), g_currentloc = fileloc_createSpec (s, 1, 1))
116 extern void setFileLine (fileId p_s, int p_line)
117 /*@globals fileloc g_currentloc; @*/
118 /*@modifies g_currentloc; @*/ ;
119 # define setFileLine(s, line) \
120 (context_setFilename(s, line))
123 # error "Multiple include"