Get N.Sub args the right way round

This commit is contained in:
Adam Sampson 2006-10-03 10:44:50 +00:00
parent a503385f6f
commit 6145c5aad2

View File

@ -276,7 +276,7 @@ caseInput
-- This is also used for timers and ports, since the syntax is identical (and
-- the parser really can't tell at this stage which is which).
channel
= do { v <- channel' ; es <- many (do { sLeft ; e <- expression ; sRight ; return e }) ; return $ foldl (\s e -> N.Sub (N.SubPlain s) e) v es }
= do { v <- channel' ; es <- many (do { sLeft ; e <- expression ; sRight ; return e }) ; return $ foldl (\e s -> N.Sub (N.SubPlain s) e) v es }
<?> "channel"
channel'
@ -513,7 +513,7 @@ occamString
<?> "string"
operand
= do { v <- operand' ; es <- many (do { sLeft ; e <- expression ; sRight ; return e }) ; return $ foldl (\s e -> N.Sub (N.SubPlain s) e) v es }
= do { v <- operand' ; es <- many (do { sLeft ; e <- expression ; sRight ; return e }) ; return $ foldl (\e s -> N.Sub (N.SubPlain s) e) v es }
<?> "operand"
operand'
@ -656,7 +656,7 @@ structuredTypeField
-- i.e. array literal
table
= do { v <- table' ; es <- many (do { sLeft ; e <- expression ; sRight ; return e }) ; return $ foldl (\s e -> N.Sub (N.SubPlain s) e) v es }
= do { v <- table' ; es <- many (do { sLeft ; e <- expression ; sRight ; return e }) ; return $ foldl (\e s -> N.Sub (N.SubPlain s) e) v es }
<?> "table"
table'
@ -692,7 +692,7 @@ valueProcess
<|> do { s <- specification ; v <- valueProcess ; return $ N.Decl s v }
variable
= do { v <- variable' ; es <- many (do { sLeft ; e <- expression ; sRight ; return e }) ; return $ foldl (\s e -> N.Sub (N.SubPlain s) e) v es }
= do { v <- variable' ; es <- many (do { sLeft ; e <- expression ; sRight ; return e }) ; return $ foldl (\e s -> N.Sub (N.SubPlain s) e) v es }
<?> "variable"
variable'