-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from jiaaro/master
delete python 2 compatibility stuff and add cython
- Loading branch information
Showing
16 changed files
with
454 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ python: | |
- "3.6" | ||
install: | ||
- pip install django==${DJANGO} | ||
- "pip install psycopg2 git+https://github.com/mediapredict/[email protected] future==0.16.0" | ||
- "pip install psycopg2 git+https://github.com/mediapredict/[email protected] cython" | ||
- "pip install ." | ||
addons: | ||
postgresql: "9.3" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from .parser import Daffodil | ||
from .predicate import DictionaryPredicateDelegate | ||
from .hstore_predicate import HStoreQueryDelegate | ||
from .pretty_print import PrettyPrintDelegate | ||
from .key_expectation_delegate import KeyExpectationDelegate | ||
from .simulation_delegate import SimulationMatchingDelegate | ||
from .parser import Daffodil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1 @@ | ||
from builtins import object | ||
|
||
|
||
class BaseDaffodilDelegate(object): | ||
|
||
def mk_any(self, children): | ||
raise NotImplementedError() | ||
|
||
def mk_all(self, children): | ||
raise NotImplementedError() | ||
|
||
def mk_not_any(self, children): | ||
raise NotImplementedError() | ||
|
||
def mk_not_all(self, children): | ||
raise NotImplementedError() | ||
|
||
def mk_test(self, test_str): | ||
raise NotImplementedError() | ||
|
||
def mk_comment(self, comment, is_inline): | ||
raise NotImplementedError() | ||
|
||
def mk_cmp(self, key, val, test): | ||
raise NotImplementedError() | ||
|
||
def call(self, predicate, iterable): | ||
raise NotImplementedError() | ||
|
||
from .parser import BaseDaffodilDelegate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
cdef class Token: | ||
cpdef public object content | ||
|
||
cdef class TimeStamp(Token): | ||
cpdef public str raw_content | ||
|
||
cdef class GroupStart(Token): pass | ||
cdef class GroupEnd(Token): pass | ||
cdef class LineComment(Token): pass | ||
cdef class TrailingComment(Token): pass | ||
cdef class Operator(Token): pass | ||
cdef class String(Token): pass | ||
cdef class Number(Token): pass | ||
cdef class Boolean(Token): pass | ||
cdef class ArrayStart(Token): pass | ||
cdef class ArrayEnd(Token): pass | ||
|
||
cdef class _ArrayToken(Token): | ||
cpdef public object raw_content | ||
|
||
cdef class BaseDaffodilDelegate: | ||
cdef mk_cmp(self, Token key, Token test, Token val) | ||
|
||
cdef class DaffodilParser: | ||
cdef public str src | ||
cdef public tokens | ||
cdef int pos, end | ||
|
||
cdef str char(self, int offset=*) | ||
cdef str chars(self, int n, pos=*) | ||
cdef consume_whitespace(self, bint newlines=*) | ||
cdef str read_quoted_string(self) | ||
|
||
|
||
cdef object _read_val(tokens) | ||
|
||
cdef class Daffodil: | ||
cdef public DaffodilParser parse_result | ||
cdef public BaseDaffodilDelegate delegate | ||
cdef public object keys, predicate |
Oops, something went wrong.