atlas  0.6
lexer.h
Go to the documentation of this file.
1 /*2:*/
2 #line 34 "lexer.w"
3 #ifndef LEXER_H
4 #define LEXER_H
5 #include "buffer.h"
6 #include "parse_types.h"
7 #include "parser.tab.h"
8 #include <cctype>
9 #include <iostream>
10 #include <string>
11 #include "global.h"
12 
13 #line 36 "lexer.w"
14 
15 namespace atlas{namespace interpreter{/*6:*/
16 #line 90 "lexer.w"
23 int nesting;
28 public:
30 (BufferedInput&,Hash_table&,const char* *,const char* *type_names);
31 int get_token(YYSTYPE*valp,YYLTYPE*locp);
32 bool reset();
33 void set_comment_delims(char c,char d)
34 {assert(c!='\0' and d!='\0');comment_start=c;comment_end=d;}
35 const char*scanned_file_name()const{return file_name.c_str();}
37 bool is_initial()const{return state==initial;}
38 private:
39 void skip_space()const;
40 bool becomes_follows();
42 };/*:6*//*4:*/
43 #line 65 "lexer.w"
44 extern Hash_table*main_hash_table;/*:4*//*7:*/
45 #line 121 "lexer.w"
46 extern Lexical_analyser*lex;/*:7*/
47 #line 40 "lexer.w"
48 
49 
50 }}
51 #endif/*:2*/
std::string file_name
Definition: lexer.h:27
states state
Definition: lexer.h:26
bool reset()
Definition: lexer.cpp:26
Definition: buffer.h:41
Hash_table::id_type id_type
Definition: parse_types.h:22
const char * scanned_file_name() const
Definition: lexer.h:35
Lexical_analyser(BufferedInput &, Hash_table &, const char **, const char **type_names)
Definition: lexer.cpp:9
id_type type_limit
Definition: lexer.h:22
Definition: parser.tab.h:139
int comment_end
Definition: lexer.h:25
BufferedInput & input
Definition: lexer.h:19
Hash_table * main_hash_table
Definition: lexer.cpp:322
Definition: buffer.h:73
id_type first_identifier() const
Definition: lexer.h:36
Lexical_analyser * lex
Definition: lexer.cpp:324
Hash_table & id_table
Definition: lexer.h:20
std::string scan_quoted_string() const
Definition: lexer.cpp:88
bool is_initial() const
Definition: lexer.h:37
bool becomes_follows()
Definition: lexer.cpp:311
void skip_space() const
Definition: lexer.cpp:29
Definition: parser.tab.h:102
int comment_start
Definition: lexer.h:25
void set_comment_delims(char c, char d)
Definition: lexer.h:33
Definition: Atlas.h:38
id_type keyword_limit
Definition: lexer.h:21
int get_token(YYSTYPE *valp, YYLTYPE *locp)
Definition: lexer.cpp:111
int nesting
Definition: lexer.h:23
Definition: cweave.c:262
char prevent_termination
Definition: lexer.h:24