1#
2# greetingInGreek.py
3#
4# Demonstration of the parsing module, on the prototypical "Hello, World!" example
5#
6# Copyright 2004-2016, by Paul McGuire
7#
8from pyparsing import Word, pyparsing_unicode as ppu
9
10# define grammar
11alphas = ppu.Greek.alphas
12greet = Word(alphas) + "," + Word(alphas) + "!"
13
14# input string
15hello = "Καλημέρα, κόσμε!"
16
17# parse input string
18print(greet.parseString(hello))
19