blob: cbce4c38bc8b0dadeb0eb0d0f5b341f89ccbf0a0 [file] [log] [blame]
Andrew Geissler220dafd2023-10-04 10:18:08 -05001# common pyparsing variables
2#
3# Copyright (C) 2016 Intel Corporation
4#
Patrick Williamsac13d5f2023-11-24 18:59:46 -06005# SPDX-License-Identifier: GPL-2.0-only
Andrew Geissler220dafd2023-10-04 10:18:08 -05006
7import pyparsing
8
9# general
10colon = pyparsing.Literal(":")
11start = pyparsing.LineStart()
12end = pyparsing.LineEnd()
13at = pyparsing.Literal("@")
14lessthan = pyparsing.Literal("<")
15greaterthan = pyparsing.Literal(">")
16opensquare = pyparsing.Literal("[")
17closesquare = pyparsing.Literal("]")
18inappropriate = pyparsing.CaselessLiteral("Inappropriate")
19submitted = pyparsing.CaselessLiteral("Submitted")
20
21# word related
22nestexpr = pyparsing.nestedExpr(opener='[', closer=']')
23inappropriateinfo = pyparsing.Literal("Inappropriate") + nestexpr
24submittedinfo = pyparsing.Literal("Submitted") + nestexpr
25word = pyparsing.Word(pyparsing.alphas)
26worddot = pyparsing.Word(pyparsing.alphas+".")