Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /pyke/krb_compiler/scanner.py [9c0a10] .. [f16399] Maximize Restore

  Switch to unified view

a/pyke/krb_compiler/scanner.py b/pyke/krb_compiler/scanner.py
...
...
91
    'CODE_TOK',
91
    'CODE_TOK',
92
    'DEINDENT_TOK',
92
    'DEINDENT_TOK',
93
    'INDENT_TOK',
93
    'INDENT_TOK',
94
    'NOT_NL_TOK',
94
    'NOT_NL_TOK',
95
    'PATTERN_VAR_TOK',
95
    'PATTERN_VAR_TOK',
96
    'PYTHON_VAR_TOK',
97
)
96
)
98
97
99
kfb_tokens = tuple(x.upper() + '_TOK' for x in kfb_keywords) + base_kfb_tokens
98
kfb_tokens = tuple(x.upper() + '_TOK' for x in kfb_keywords) + base_kfb_tokens
100
99
101
tokens = tuple(x.upper() + '_TOK' for x in keywords) + base_krb_tokens
100
tokens = tuple(x.upper() + '_TOK' for x in keywords) + base_krb_tokens
...
...
358
    if kfb_mode: t_ANY_error(t)
357
    if kfb_mode: t_ANY_error(t)
359
    if goal_mode:
358
    if goal_mode:
360
        t.value = t.value[1:]
359
        t.value = t.value[1:]
361
    else:
360
    else:
362
        t.value = "'" + t.value[1:] + "'"
361
        t.value = "'" + t.value[1:] + "'"
363
    return t
364
365
def t_PYTHON_VAR_TOK(t):
366
    r'%[a-zA-Z][a-zA-Z0-9_]*'
367
    if not goal_mode: t_ANY_error(t)
368
    t.value = t.value[1:]
369
    return t
362
    return t
370
363
371
def t_IDENTIFIER_TOK(t):
364
def t_IDENTIFIER_TOK(t):
372
    r'[a-zA-Z_][a-zA-Z0-9_]*'
365
    r'[a-zA-Z_][a-zA-Z0-9_]*'
373
    if kfb_mode and t.value in kfb_keywords or \
366
    if kfb_mode and t.value in kfb_keywords or \