Python pyparsing.LineEnd() Examples
The following are 1
code examples of pyparsing.LineEnd().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
pyparsing
, or try the search function
.
Example #1
Source File: state_transition_diagram.py From pyagram with MIT License | 5 votes |
def lexical_analysis(self, src): string = pp.Regex('[a-zA-Z0-9_{}"=+\-*/\.:;&%@$#<>? a-zA-Zぁ-ゔゞァ-・ヽヾ゛゜ー一-龯]+') blank = pp.LineStart() + pp.LineEnd() start = '[' end = ']' + pp.LineEnd() graph_tag = pp.LineStart() + '@' graph = graph_tag + start + string + end view_tag = pp.LineStart() + '#' view = view_tag + start + string + end server_process_tag = pp.LineStart() + '$' server_process = server_process_tag + start + string + end client_process_tag = pp.LineStart() + '%' client_process = client_process_tag + start + string + end view_transition_identifier = pp.LineStart() + '-->' view_transition = view_transition_identifier + string process_transition_identifier = pp.LineStart() + '==>' process_transition = process_transition_identifier + string state_machine = pp.OneOrMore(graph | view | server_process | client_process | view_transition | process_transition | string | blank) return state_machine.parseString(src)