We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I'm trying to run the example:
from plyse import QueryParser, GrammarFactory parser = QueryParser(GrammarFactory.build_default()) query = parser.parse("hello world")
And I'm getting the following exception:
TypeError Traceback (most recent call last) <ipython-input-2-b3d479bcc134> in <module> ----> 1 parser = QueryParser(GrammarFactory.build_default()) lib\site-packages\plyse\grammar.py in build_default(term_parser) 22 t_parser = term_parser or TermParserFactory.build_default() 23 operators = [Operator("not", ['!', '-', 'not']), Operator('and', ['+', 'and']), Operator('or', ['or'], True)] ---> 24 term = TermFactory.build_default_term(t_parser) 25 26 return Grammar(operators=operators, term=term, keywords=[], term_parser=t_parser) lib\site-packages\plyse\expressions\terms.py in build_default_term(parser) 14 @staticmethod 15 def build_default_term(parser): ---> 16 values = [IntegerRange(range_parse_method=parser.range_parse, item_parse_method=parser.integer_parse), 17 Integer(parse_method=parser.integer_parse), 18 PartialString(parse_method=parser.partial_string_parse), lib\site-packages\plyse\expressions\primitives.py in __init__(self, range_parse_method, item_parse_method, range_symbol, precedence) 178 179 def __init__(self, range_parse_method=None, item_parse_method=None, range_symbol='..', precedence=10): --> 180 And.__init__(self, Integer(item_parse_method) + Literal(range_symbol) + Integer(item_parse_method)) 181 BaseType.__init__(self, precedence) 182 lib\site-packages\pyparsing.py in __init__(self, exprs, savelist) 4010 4011 def __init__(self, exprs, savelist=True): -> 4012 exprs = list(exprs) 4013 if exprs and Ellipsis in exprs: 4014 tmp = [] lib\site-packages\pyparsing.py in __iter__(self) 2374 # must implement __iter__ to override legacy use of sequential access to __getitem__ to 2375 # iterate over a sequence -> 2376 raise TypeError('%r object is not iterable' % self.__class__.__name__) 2377 2378 def __getitem__(self, key):
pyparsing version: 2.4.7
The text was updated successfully, but these errors were encountered:
@espdev if it's still important for you. try to use version 1.0.4
Sorry, something went wrong.
using 1.0.4 is made more difficult by #15 (you can work around with pip install git+https://github.com/sebastiandev/plyse.git)
pip install git+https://github.com/sebastiandev/plyse.git
No branches or pull requests
Hello,
I'm trying to run the example:
And I'm getting the following exception:
pyparsing version: 2.4.7
The text was updated successfully, but these errors were encountered: