⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.118
Server IP:
88.222.222.80
Server:
Linux sg-nme-web1518.main-hosting.eu 5.14.0-611.16.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Dec 22 03:40:39 EST 2025 x86_64
Server Software:
LiteSpeed
PHP Version:
8.3.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
opt
/
gsutil
/
third_party
/
pyparsing
/
examples
/
View File Name :
tag_metadata.py
# # tag_metadata.py # # Copyright 2024, Paul McGuire # import pyparsing as pp ppu = pp.unicode # associate "alphabet" tag with different Unicode character sets latin = pp.Word(ppu.Latin1.alphas) + pp.Tag("alphabet", "Latin") greek = pp.Word(ppu.Greek.alphas) + pp.Tag("alphabet", "Greek") japanese = pp.Word(ppu.Japanese.alphas) + pp.Tag("alphabet", "Japanese") # associate "mood" tags with different end punctuation marks end_punc = ( ("." + pp.Tag("mood", "normal")) | ("!" + pp.Tag("mood", "excited")) | ("?" + pp.Tag("mood", "curious")) ) greeting = "Hello," + (latin | greek | japanese) + end_punc if __name__ == '__main__': import contextlib with contextlib.suppress(Exception): greeting.create_diagram( "tag_metadata_diagram.html", vertical=3, show_hidden=True ) greeting.run_tests( """\ Hello, World. Hello, World! Hello, κόσμος? Hello, 世界! """ )