# Path: chemdataextractor/parse/elements.py
# W = Word
# 
# T = Tag
# 
# R = Regex
# 
# class Optional(ParseElementEnhance):
# 
#     def __init__(self, expr):
#         super(Optional, self).__init__(expr)
# 
#     def _parse_tokens(self, tokens, i, actions=True):
#         results = []
#         try:
#             results, i = self.expr.parse(tokens, i, actions)
#         except (ParseException, IndexError):
#             pass
#         return results, i


import logging
import re
from .elements import W, T, R, Optional
colon = T(':')
wdt = T('WDT')
jjr = T('JJR')
rp = T('RP')
nnps = T('NNPS')
wp = T('WP')
wrb = T('WRB')
rbr = T('RBR')
jjs = T('JJS')
rrb = T('-RRB-')
lrb = T('-LRB-')
ex = T('EX')
rbs = T('RBS')
pdt = T('PDT')
sym = T('SYM')
fw = T('FW')
wpd = T('WP$')
uh = T('UH')
ls = T('LS')
nfp = T('NFP')
afx = T('AFX')

# Chemical entities
bcm = T('B-CM')
icm = T('I-CM')

# Roman numerals 1-9
roman_numeral = R('^(I|II|III|IV|V|VI|VII|VIII|IX|XI|XII|XIII|XIV)$', re.I)

# Punctuation delimiter that is hidden

# Path: chemdataextractor/parse/elements.py
# W = Word
# 
# T = Tag
# 
# R = Regex
# 
# class Optional(ParseElementEnhance):
# 
#     def __init__(self, expr):
#         super(Optional, self).__init__(expr)
# 
#     def _parse_tokens(self, tokens, i, actions=True):
#         results = []
#         try:
#             results, i = self.expr.parse(tokens, i, actions)
#         except (ParseException, IndexError):
#             pass
#         return results, i


# Path: chemdataextractor/parse/common.py
import logging
import re
from .elements import W, T, R, Optional

colon = T(':')
wdt = T('WDT')
jjr = T('JJR')
rp = T('RP')
nnps = T('NNPS')
wp = T('WP')
wrb = T('WRB')
rbr = T('RBR')
jjs = T('JJS')
rrb = T('-RRB-')
lrb = T('-LRB-')
ex = T('EX')
rbs = T('RBS')
pdt = T('PDT')
sym = T('SYM')
fw = T('FW')
wpd = T('WP$')
uh = T('UH')
ls = T('LS')
nfp = T('NFP')
afx = T('AFX')

# Chemical entities
bcm = T('B-CM')
icm = T('I-CM')

# Roman numerals 1-9
roman_numeral = R('^(I|II|III|IV|V|VI|VII|VIII|IX|XI|XII|XIII|XIV)$', re.I)

# Punctuation delimiter that is hidden

delim = R('^[,:;\.\[\]\(\)\{\}/]$').hide()