-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSchSyntaxParser.h
More file actions
60 lines (45 loc) · 963 Bytes
/
SchSyntaxParser.h
File metadata and controls
60 lines (45 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* SchSyntaxParser.h
*
* Created on: 17.04.2013
* Author: urandon
*/
#ifndef SCHSYNTAXPARSER_H_
#define SCHSYNTAXPARSER_H_
#include "SchLexicalParser.h"
#include "SchObject.h"
class SchObjectRef;
class SchObject;
struct list_t;
class SchSyntaxParser {
public:
SchSyntaxParser(/*int fd*/);
~SchSyntaxParser();
struct lex_storage_t {
static const int DEFAULT_SIZE = 64;
lexem ** data;
int size;
int allocated;
lex_storage_t();
~lex_storage_t();
void push(const lexem & lexem);
};
SchObjectRef parse(); // @deprecated
SchObjectRef trueParse();
void reset();
void receive(int fd);
const char * getLexString(int id);
private:
SchLexicalParser lexical;
lex_storage_t storage;
int ptr;
lexem * previous();
lexem * current();
lexem * next();
SchObjectRef rec_obj();
SchObjectRef rec_list();
list_t * rec_internal();
SchObjectRef rec_atom();
SchObjectRef rec_special_atom();
};
#endif /* SCHSYNTAXPARSER_H_ */