STR-301: Check implementation of quoted constructors
?“pp-tables-0”() did not work for a constructor “pp-tables-0”. The generic term deconstruction variant works.
Submitted on 19 May 2005 at 13:06
Issue Log
STR-301, martin:
The problem seems to be related to externally created quoted constructors only, so maybe the internal representation of quotes constructors is not correct.Example:
————————————-
module foo
imports list-cons libstrategolib
strategiesmain =
io-wrap(
debug(!"input: ")
; ?“pp-tables-0”()
)signature
constructors
“pp-tables-0” : Int -> Foo
————————————-
strc -i foo.str -la stratego-lib
————————————-
martin@logistico:~/tmp/printl> echo ““pp-tables-0”(1)” | ./foo
input: “pp-tables-0”(1)
./foo: rewriting failed
————————————-This should succeed. If you build the term in Stratego, then the match succeeds.
STR-301, visser:
Solution:In generation of C code in the back-end, check if constructor
is double quoted. If this is the case the call to ATmakeSymbol
should get ATtrue as third argument to indicate that the symbol
is quoted, and the string itself should be unquoted.
Log in to post comments