Skip to content

Commit

Permalink
MAI: do not import hidden pyparsing._noncomma, instead reconstruct it
Browse files Browse the repository at this point in the history
because `_noncomma` has been removed in `pyparsing >= 2.0.1`.
This change makes `pydot >= 1.1.0` compatible with `pyparsing >= 1.5.7`.
  • Loading branch information
nlhepler authored and johnyf committed May 23, 2016
1 parent 09abd83 commit 6dff94b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dot_parser.py
Expand Up @@ -25,7 +25,7 @@
from pyparsing import ( nestedExpr, Literal, CaselessLiteral, Word, OneOrMore, ZeroOrMore,
Forward, NotAny, delimitedList, oneOf, Group, Optional, Combine, alphas, nums,
restOfLine, cStyleComment, nums, alphanums, printables, empty, quotedString,
ParseException, ParseResults, CharsNotIn, _noncomma, dblQuotedString, QuotedString, ParserElement )
ParseException, ParseResults, CharsNotIn, dblQuotedString, QuotedString, ParserElement )


class P_AttrList:
Expand Down Expand Up @@ -414,7 +414,8 @@ def graph_definition():

double_quoted_string = QuotedString('"', multiline=True, unquoteResults=False) # dblQuotedString

alphastring_ = OneOrMore(CharsNotIn(_noncomma + ' '))
noncomma = "".join([c for c in printables if c != ","])
alphastring_ = OneOrMore(CharsNotIn(noncomma + ' '))

def parse_html(s, loc, toks):
return '<%s>' % ''.join(toks[0])
Expand Down

0 comments on commit 6dff94b

Please sign in to comment.