parse.pxd 1.78 KB
Newer Older
Eckhart Arnold's avatar
Eckhart Arnold committed
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#cython: infer_types=True
#cython: language_level=3
#cython: c_string_type=unicode
#cython: c_string_encoding=utf-8

import cython
from DHParser cimport syntaxtree


# cdef class ParserError(Exception):
#     cdef bint first_throw

# cdef add_parser_guard(parser_func)

# cdef class Parser(syntaxtree.ParserBase):
#     pass

# cdef class Grammar:
#     cdef bint dirty_flag__
#     cdef bint history_tracking__
#     cdef bint memoization__
#     cdef bint left_recursion_handling__
#     cdef int document_length__
#     cdef int last_rb__loc__
#     cdef bint moving_forward__

# cdef class PreprocessorToken(Parser):
#     pass
#
# cdef class Token(Parser):
#     cdef int len
#
# cdef class RegExp(Parser):
#     pass
#
# cdef class Whitespace(RegExp):
#     pass
#
# cdef class UnaryOperator(Parser):
#     pass
#
# cdef class NaryOperator(Parser):
#     pass
#
# cdef class Option(UnaryOperator):
#     pass
#
# cdef class ZeroOrMore(Option):
#     pass
#
# cdef class OneOrMore(UnaryOperator):
#     pass
#
# cdef class Series(NaryOperator):
#     cdef int mandatory
#
# cdef class Alternative(NaryOperator):
#     pass
#
# cdef class SomeOf(NaryOperator):
#     pass
#
# cdef class AllOf(NaryOperator):
#     cdef int mandatory
#     cdef int num_parsers
#
# cdef class FlowOperator(UnaryOperator):
#     pass
#
# # cdef class Required(FlowOperator):
# #     pass
#
# cdef class Lookahead(FlowOperator):
#     pass
#
# cdef class NegativeLookahead(Lookahead):
#     pass
#
# cdef class Lookbehind(FlowOperator):
#     pass
#
# cdef class NegativeLookbehind(Lookbehind):
#     pass
#
# cdef class Capture(UnaryOperator):
#     pass
#
# cdef class Retrieve(Parser):
#     pass
#
# cdef class Pop(Retrieve):
#     pass
#
# cdef class Synonym(UnaryOperator):
#     pass
#
# cdef class Forward(Parser):
#     pass