summaryrefslogtreecommitdiff
path: root/trunk/src/examples/nested.py
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src/examples/nested.py')
-rw-r--r--trunk/src/examples/nested.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/trunk/src/examples/nested.py b/trunk/src/examples/nested.py
deleted file mode 100644
index 24cf2f4..0000000
--- a/trunk/src/examples/nested.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# nested.py
-# Copyright, 2007 - Paul McGuire
-#
-# Simple example of using nestedExpr to define expressions using
-# paired delimiters for grouping lists and sublists
-#
-
-from pyparsing import *
-import pprint
-
-data = """
-{
- { item1 "item with } in it" }
- {
- {item2a item2b }
- {item3}
- }
-
-}
-"""
-
-# use {}'s for nested lists
-nestedItems = nestedExpr("{", "}")
-print(( (nestedItems+stringEnd).parseString(data).asList() ))
-
-# use default delimiters of ()'s
-mathExpr = nestedExpr()
-print(( mathExpr.parseString( "((( ax + by)*C) *(Z | (E^F) & D))") ))
-