'Weird grammar:
nth : S* nthPart S* ;
nthPart: [\'-\'|\'+\']? INTEGER? {N} [S* [\'-\'|\'+\'] S* INTEGER]?
| [\'-\'|\'+\']? INTEGER
| {ODD}
| {EVEN}
Note that + will be colored as an op, but - will be colored as
an unknown identifier'

def _parse_structural_pseudo_class_arg(self):

    tok = self._tokenizer.get_next_token()
    if (self._classifier.is_tag(tok) and (tok['text'].lower() in ('odd', 'even'))):
        return
    tokens = self._reparse_structural_tokens(tok)
    end_tok = tokens.pop()
    if (not tokens):
        self._add_result('expecting    a    value', end_tok)
        return
    tok = tokens.pop(0)
    if (self._classifier.is_operator(tok) and (tok['text'] in ('-', '+'))):
        tokSign = tok
        if (not tokens):
            self._add_result('expecting    a    number    or    N', end_tok)
            return
        tok = tokens.pop(0)
        if ((tokSign['end_line'] != tok['start_line']) or (tokSign['end_column'] != tok['start_column'])):
            self._add_result(('expecting    no    space    before    %s' % tok['text']), tok)
    met_requirement = False
    tokNum = None
    if self._classifier.is_number(tok):
        if (not tokens):
            return
        met_requirement = True
        tokNum = tok
        tok = tokens.pop(0)
    if (self._classifier.is_value(tok) and (tok['text'].lower() == 'n')):
        if (not tokens):
            return
        if (tokNum and ((tokNum['end_line'] != tok['start_line']) or (tokNum['end_column'] != tok['start_column']))):
            self._add_result(('expecting    no    space    before    %s' % tok['text']), tok)
        tok = tokens.pop(0)
    elif (not met_requirement):
        self._add_result('expecting    a    number    or    N', tok)
        return
    else:
        self._add_result("expecting    ')'", tok)
        return
    require_number = False
    if (self._classifier.is_operator(tok) and (tok['text'] in ('-', '+'))):
        if (not tokens):
            self._add_result('expecting    a    number', end_tok)
            return
        tok = tokens.pop(0)
    if self._classifier.is_number(tok):
        if (not tokens):
            return
    else:
        self._add_result('expecting    a    number', tok)
    if tokens:
        self._add_result("expecting    ')'", tokens[0])
