|
1 | 1 | import re |
2 | | -from pyparsing import (Word, alphanums, delimitedList, OneOrMore, ZeroOrMore, |
3 | | - Forward, Suppress, Group, ParserElement, Keyword, |
4 | | - dblQuotedString, removeQuotes, SkipTo, StringEnd, Regex, |
5 | | - printables) |
| 2 | +from pyparsing import ( |
| 3 | + LineEnd, LineStart, Word, alphanums, delimitedList, OneOrMore, ZeroOrMore, |
| 4 | + Forward, Suppress, Group, ParserElement, Keyword, dblQuotedString, |
| 5 | + removeQuotes, SkipTo, StringEnd, Regex, printables) |
6 | 6 | from pyparsing import pyparsing_common as ppc |
7 | | -import time |
| 7 | + |
8 | 8 |
|
9 | 9 | ATTR = re.compile(r"I\[([0-9]+)l?\]\[([0-9]+)l?\]") |
10 | 10 | LSTIG = re.compile(r"Lvalue\[([0-9]+)l?\]\[([0-9]+)l?\]") |
|
48 | 48 | ASGN = Regex(r'(?P<lhs>[^\s=]+)=(?P<rhs>.+)') |
49 | 49 | TRACE = OneOrMore(Group(Group(HEADER) + SEP.suppress() + Group(ASGN))).ignore(OneOrMore(SKIP)) # noqa: E501 |
50 | 50 | TRACE_OLD = OneOrMore(Group(Group(HEADER_OLD) + SEP.suppress() + Group(ASGN))).ignore(OneOrMore(SKIP)) # noqa: E501 |
51 | | -PROP = Suppress(HEADER | HEADER_OLD) + STUFF + Suppress(SkipTo(StringEnd())) |
| 51 | +PROP = Suppress(SkipTo(LineEnd())) + Suppress(SkipTo(LineStart())) + STUFF + Suppress(SkipTo(StringEnd())) # noqa: E501 |
52 | 52 |
|
53 | 53 |
|
54 | 54 | def pprint_agent(info, tid): |
|
0 commit comments