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
In attempting to use a concrete syntax pattern for matching a Rascal map, I've encountered a problem with declaring a variable to represent a mapping. Pasted below is part of an email sent to Jurgen on 19/2/2010:
I'll look through the code to see if I can figure this out, but will just work on other things for now. I'm trying to match mappings in the type checker, but I'm getting a parser error:
Created 2010-03-02 by [email protected] assigned to [email protected]
In attempting to use a concrete syntax pattern for matching a Rascal map, I've encountered a problem with declaring a variable to represent a mapping. Pasted below is part of an email sent to Jurgen on 19/2/2010:
I'll look through the code to see if I can figure this out, but will just work on other things for now. I'm trying to match mappings in the type checker, but I'm getting a parser error:
rascal>
( <{Mapping[[Expression]] ","}* mps> )
:= expMap;^ parse error here
rascal>
( < {Mapping[[Expression]] ","}* mps > )
:= expMap;^ parse error here
rascal>
( < {Mapping ","}* mps > )
:= expMap;internal exception: java.lang.NullPointerException
rascal>
( < {Mapping[Expression] ","}* mps > )
:= expMap;^ parse error here
I think this is because of the use of [ and ] in the pattern, but this is what is used in the SDF definition:
sorts Mapping
context-free syntax
from:Expression ":" to:Expression -> Mapping[[Expression]] {cons("Default")}
"(" mappings:{Mapping[[Expression]] ","}* ")" -> Expression {cons("Map")}
The text was updated successfully, but these errors were encountered: