r'<\?php((?!<\?php)[\s\S])*\?>[ \t]*(?=\n)

def t_NATIVEPHP(t):
    r'<\?php((?!<\?php)[\s\S])*\?>[ \t]*(?=\n)'
    lineNoInc(t)
    t.value = t.value[6:].lstrip()
    pos2 = t.value.rfind('?>')
    t.value = t.value[0:pos2].rstrip()
    # print t.value
    return t