Ignore:
Timestamp:
Feb 8, 2010 5:13:22 PM (10 years ago)
Author:
wehart
Message:

Setting up 'import' tests for the other simple examples.
These seem to work, but the internal code is too ugly. I'm
going to clean that up next to help explain what is going on...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.pyomo/trunk/coopr/pyomo/data/parse_datacmds.py

    r2285 r2289  
    104104    return t
    105105
    106 t_NONWORD   = r"[^\.A-Za-z0-9,;:<>\(\)\#{}\[\] \n\t\r]+"
     106t_NONWORD   = r"[^\.A-Za-z0-9,;:=<>\(\)\#{}\[\] \n\t\r]+"
    107107
    108108# Error handling rule
     
    178178            p[0] = [tmp, p[3], p[4]]
    179179        else:
     180            tmp.update(p[2])
    180181            p[0] = [tmp, [], p[4]]
    181182    elif len(p) == 6:
     
    187188def p_import_options(p):
    188189    '''import_options : WORD EQ STRING import_options
     190                      | WORD EQ STRING
    189191                      | WORD EQ QUOTEDSTRING import_options
    190                       | WORD EQ STRING
    191192                      | WORD EQ QUOTEDSTRING
     193                      | WORD EQ WORD import_options
     194                      | WORD EQ WORD
     195                      | WORD EQ PARAM import_options
     196                      | WORD EQ PARAM
    192197    '''
    193198    tmp = {p[1]:p[3]}
Note: See TracChangeset for help on using the changeset viewer.