Changed the occam parser to accept STEP in replicators
This commit is contained in:
parent
e1056dd0c9
commit
6d7f456791
|
@ -114,8 +114,9 @@ sAFTER, sALT, sAND, sANY, sAT, sBITAND, sBITNOT, sBITOR, sBOOL, sBYTE,
|
||||||
sINLINE, sIN, sINITIAL, sINT, sINT16, sINT32, sINT64, sIS, sMINUS, sMOSTNEG,
|
sINLINE, sIN, sINITIAL, sINT, sINT16, sINT32, sINT64, sIS, sMINUS, sMOSTNEG,
|
||||||
sMOSTPOS, sNOT, sOF, sOFFSETOF, sOR, sPACKED, sPAR, sPLACE, sPLACED, sPLUS,
|
sMOSTPOS, sNOT, sOF, sOFFSETOF, sOR, sPACKED, sPAR, sPLACE, sPLACED, sPLUS,
|
||||||
sPORT, sPRI, sPROC, sPROCESSOR, sPROTOCOL, sREAL32, sREAL64, sRECORD, sREM,
|
sPORT, sPRI, sPROC, sPROCESSOR, sPROTOCOL, sREAL32, sREAL64, sRECORD, sREM,
|
||||||
sRESHAPES, sRESULT, sRETYPES, sROUND, sSEQ, sSIZE, sSKIP, sSTOP, sTIMER,
|
sRESHAPES, sRESULT, sRETYPES, sROUND, sSEQ, sSIZE, sSKIP, sSTEP, sSTOP,
|
||||||
sTIMES, sTRUE, sTRUNC, sTYPE, sVAL, sVALOF, sWHILE, sWORKSPACE, sVECSPACE
|
sTIMER, sTIMES, sTRUE, sTRUNC, sTYPE, sVAL, sVALOF, sWHILE, sWORKSPACE,
|
||||||
|
sVECSPACE
|
||||||
:: OccParser ()
|
:: OccParser ()
|
||||||
|
|
||||||
sAFTER = reserved "AFTER"
|
sAFTER = reserved "AFTER"
|
||||||
|
@ -174,6 +175,7 @@ sROUND = reserved "ROUND"
|
||||||
sSEQ = reserved "SEQ"
|
sSEQ = reserved "SEQ"
|
||||||
sSIZE = reserved "SIZE"
|
sSIZE = reserved "SIZE"
|
||||||
sSKIP = reserved "SKIP"
|
sSKIP = reserved "SKIP"
|
||||||
|
sSTEP = reserved "STEP"
|
||||||
sSTOP = reserved "STOP"
|
sSTOP = reserved "STOP"
|
||||||
sTIMER = reserved "TIMER"
|
sTIMER = reserved "TIMER"
|
||||||
sTIMES = reserved "TIMES"
|
sTIMES = reserved "TIMES"
|
||||||
|
@ -612,7 +614,7 @@ table'
|
||||||
A.Infer -> defT
|
A.Infer -> defT
|
||||||
_ -> t
|
_ -> t
|
||||||
return $ A.Literal m t' lr
|
return $ A.Literal m t' lr
|
||||||
<|> maybeSliced table A.SubscriptedExpr
|
<|> maybeSliced (table <|> arrayConstructor) A.SubscriptedExpr
|
||||||
<?> "table'"
|
<?> "table'"
|
||||||
|
|
||||||
tableElems :: OccParser (A.Type, A.LiteralRepr)
|
tableElems :: OccParser (A.Type, A.LiteralRepr)
|
||||||
|
@ -928,7 +930,8 @@ replicator
|
||||||
b <- expression
|
b <- expression
|
||||||
sFOR
|
sFOR
|
||||||
c <- expression
|
c <- expression
|
||||||
return (n, A.For m b c)
|
st <- tryXV sSTEP expression <|> return (makeConstant m 1)
|
||||||
|
return (n, A.For m b c st)
|
||||||
<?> "replicator"
|
<?> "replicator"
|
||||||
--}}}
|
--}}}
|
||||||
--{{{ specifications, declarations, allocations
|
--{{{ specifications, declarations, allocations
|
||||||
|
|
Loading…
Reference in New Issue
Block a user