——————————————————————————————
module drbug
imports
libstratego-lib

signature
constructors
Foo : SomeConstructor
Bar : SomeConstructor
Boo : SomeConstructor

strategies

main =
drbug

drbug =
!“some value” => var
; rules(DrBug:+ Foo() -> Bar())
; rules(DrBug:+ var -> Boo())
; DrBug
——————————————————————————————

Compile:
——————————————————————————————
martin@nisaaw:~/tmp/merijn-bug> strc -i drbug.str -la stratego-lib -O 5
[ strc | info ] Compiling ‘drbug.str’
[ strc | info ] Front-end succeeded : [user/system] = [1.04s/0.16s]
[ strc | info ] Optimization succeeded -O 5 : [user/system] = [0.00s/0.00s]
* warning (escaping-var-id): aux_DrBug_0_2 not declared
[ strc | info ] Back-end succeeded : [user/system] = [0.27s/0.00s]
gcc -I /pkg/strategoxt/2007-01-04-22-59/include -I /pkg/strategoxt/2007-01-04-22-59/include -I /home/martin/.nix-profile/include -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -Wno-unused-parameter -c drbug.c -fPIC -DPIC -o .libs/drbug.o
drbug.c: In function ‘lifted2’:
drbug.c:251: warning: implicit declaration of function ‘aux_DrBug_0_2’
drbug.c:251: warning: assignment makes pointer from integer without a cast
gcc -I /pkg/strategoxt/2007-01-04-22-59/include -I /pkg/strategoxt/2007-01-04-22-59/include -I /home/martin/.nix-profile/include -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -Wno-unused-parameter -c drbug.c -o drbug.o >/dev/null 2>&1
gcc .libs/drbug.o -o drbug -L/home/martin/.nix-profile/lib /pkg/strategoxt/2007-01-04-22-59/lib/libstratego-lib.so /pkg/strategoxt/2007-01-04-22-59/lib/libstratego-lib-native.so /pkg/strategoxt/2007-01-04-22-59/lib/libstratego-runtime.so /nix/store/625wlhx0dk477wpmylzzn27lfcf463z8-aterm/lib/libATerm.so -lm -Wl,–rpath -Wl,/nix/store/625wlhx0dk477wpmylzzn27lfcf463z8-aterm/lib -Wl,–rpath -Wl,/pkg/strategoxt/2007-01-04-22-59/lib -Wl,–rpath -Wl,/nix/store/625wlhx0dk477wpmylzzn27lfcf463z8-aterm/lib -Wl,–rpath -Wl,/pkg/strategoxt/2007-01-04-22-59/lib
.libs/drbug.o: In function lifted2': drbug.c:(.text+0x8ef): undefined reference toaux_DrBug_0_2’
collect2: ld returned 1 exit status
[ strc | error ] Compilation failed (2.08 secs)
——————————————————————————————

Submitted on 10 January 2007 at 10:55

On 9 January 2013 at 16:56 Eelco Visser removed tag 0.19M1

On 9 January 2013 at 16:56 Eelco Visser tagged interesting

Log in to post comments