You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Sorry but I could not find any other place to write about my issues.
I am new in Compiler and trying to learn using PLY, it seems very easy and handy, so thank you for you great project. :)
The question is that i cannot made the correct parser for the case when we have something like the following code:
BG = 12 mg/dL
timeout = None
the part which is related to this code in parser is
Hi,
Sorry but I could not find any other place to write about my issues.
I am new in Compiler and trying to learn using PLY, it seems very easy and handy, so thank you for you great project. :)
The question is that i cannot made the correct parser for the case when we have something like the following code:
BG = 12 mg/dL
timeout = None
the part which is related to this code in parser is
reserved = {
'bg' : 'BG',
'timeout' : 'TIMEOUT',
}
t_STRING = r'[a-zA-Z]\w_'
t_BG_VALUE = r'\d+\s_mg\s_/\s_dL'
t_TIMEOUT_VALUE = 'None|(30\s_sec)|([1-3]\s_min)'''
def p_configuration_step(t):
'''configuration_step : BG ASSIGN BG_VALUE
| TIMEOUT ASSIGN TIMEOUT_VALUE'''
node = ASTNode(NodeTypes.ConfigurationStep, t[1])
node.insertChild(0, ASTNode(NodeTypes.ConfigurationValue, t[3]))
t[0] = node
what ever I do I got
Syntax error on timeout at line 1
Please advice....
skype: akeshmiri
email: kimiak2000@gmail.com
The text was updated successfully, but these errors were encountered: