ADT
aaron-thesis
arm-eh
ast-experimental
cleanup-dtors
ctor
deferred_resn
demangler
enum
forall-pointer-decay
gc_noraii
jacob/cs343-translation
jenkins-sandbox
memory
new-ast
new-ast-unique-expr
new-env
no_list
persistent-indexer
pthread-emulation
qualifiedEnum
resolv-new
string
with_gc
|
Last change
on this file since c8ffe20b was 51b73452, checked in by Peter A. Buhr <pabuhr@…>, 11 years ago |
|
initial commit
|
-
Property mode
set to
100644
|
|
File size:
732 bytes
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * This file is part of the Cforall project
|
|---|
| 3 | *
|
|---|
| 4 | * $Id: lex.h,v 1.2 2003/11/07 19:45:31 rcbilson Exp $
|
|---|
| 5 | *
|
|---|
| 6 | * Prototypes that enable Roskind's c5.y to compile with g++
|
|---|
| 7 | * Richard Bilson 5 Jan 2001
|
|---|
| 8 | *
|
|---|
| 9 | */
|
|---|
| 10 |
|
|---|
| 11 | #ifndef PARSER_LEX_H
|
|---|
| 12 | #define PARSER_LEX_H
|
|---|
| 13 |
|
|---|
| 14 | int yylex();
|
|---|
| 15 | void yyerror(char *);
|
|---|
| 16 | extern "C" {
|
|---|
| 17 | #include <malloc.h>
|
|---|
| 18 | }
|
|---|
| 19 |
|
|---|
| 20 | /* External declarations for information sharing between lexer and scanner */
|
|---|
| 21 | #include "TypedefTable.h"
|
|---|
| 22 | extern TypedefTable typedefTable;
|
|---|
| 23 |
|
|---|
| 24 | /* current location in the input */
|
|---|
| 25 | extern int yylineno;
|
|---|
| 26 | extern char *yyfilename;
|
|---|
| 27 |
|
|---|
| 28 | struct Location
|
|---|
| 29 | {
|
|---|
| 30 | char *file;
|
|---|
| 31 | int line;
|
|---|
| 32 | };
|
|---|
| 33 |
|
|---|
| 34 | class Token
|
|---|
| 35 | {
|
|---|
| 36 | public:
|
|---|
| 37 | std::string *str;
|
|---|
| 38 | Location loc;
|
|---|
| 39 |
|
|---|
| 40 | operator std::string *() { return str; }
|
|---|
| 41 | };
|
|---|
| 42 |
|
|---|
| 43 | #endif // ifndef PARSER_LEX_H
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.