You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importpyparsingasppstr_text="get a b c from cup;"content=pp.Word(pp.alphas)
content_pos=pp.OneOrMore(content).set_name("contents")
container=pp.Word(pp.alphas).set_name("container")
end_flag=';'get=pp.Keyword('get')
from_=pp.Keyword('from')
pattern=get+content_pos+from_+container+end_flagprint(pattern.parse_string(str_text))
I got an error pyparsing.exceptions.ParseException: Expected Keyword 'from', found ';' (at char 18), (line:1, col:19) from is matched by content_pos
But I want from as a keyword to be matched by from_
How should I fix it, thanks