Source

ply / test / lex_dup2.py

The default branch has multiple heads

Full commit
# lex_token.py
#
# Duplicated rule specifiers

import sys
sys.path.append("..")

import ply.lex as lex

tokens = [
    "PLUS",
    "MINUS",
    "NUMBER",
    ]

t_PLUS = r'\+'
t_MINUS = r'-'
def t_NUMBER(t):
    r'\d+'
    pass

def t_NUMBER(t):
    r'\d+'
    pass

def t_error(t):
    pass

sys.tracebacklimit = 0

lex.lex()