From de8326d00dffdb500c02839a98330b869c2457f3 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sat, 22 Dec 2018 09:28:48 -0800 Subject: Trim trailing white space throughout the project Many editors clean up trailing white space on save. By removing it all in one go, it helps keep future diffs cleaner by avoiding spurious white space changes on unrelated lines. --- examples/jsonParser.py | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'examples/jsonParser.py') diff --git a/examples/jsonParser.py b/examples/jsonParser.py index f080c6c..6319c36 100644 --- a/examples/jsonParser.py +++ b/examples/jsonParser.py @@ -11,19 +11,19 @@ # Updated 9 Aug 2016 - use more current pyparsing constructs/idioms # json_bnf = """ -object - { members } - {} -members - string : value - members , string : value -array +object + { members } + {} +members + string : value + members , string : value +array [ elements ] - [] -elements - value - elements , value -value + [] +elements + value + elements , value +value string number object @@ -55,10 +55,10 @@ memberDef = Group(jsonString + COLON + jsonValue) jsonMembers = delimitedList(memberDef) jsonObject << Dict(LBRACE + Optional(jsonMembers) + RBRACE) -jsonComment = cppStyleComment +jsonComment = cppStyleComment jsonObject.ignore(jsonComment) - + if __name__ == "__main__": testdata = """ { @@ -66,7 +66,7 @@ if __name__ == "__main__": "title": "example glossary", "GlossDiv": { "title": "S", - "GlossList": + "GlossList": { "ID": "SGML", "SortAs": "SGML", @@ -103,5 +103,3 @@ if __name__ == "__main__": testPrint( results.glossary.GlossDiv.GlossList.Acronym ) testPrint( results.glossary.GlossDiv.GlossList.EvenPrimesGreaterThan2 ) testPrint( results.glossary.GlossDiv.GlossList.PrimesLessThan10 ) - - -- cgit v1.2.1