Stratego/XT JIRA  History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: STR-266
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Anonymous
Votes: 0
Watchers: 1
Operations

Clone this issue
Create sub-task
If you were logged in you would be able to see more operations.
Stratego/XT

newname strategy produces additional 'weird' characters

Created: 2005-03-06 15:55   Updated: 2008-03-31 20:39
Component/s: stratego-lib - Stratego Library
Affects Version/s: 0.14
Fix Version/s: 0.14

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: strategoxt-0.14pre9162 from http://catamaran.labs.cs.uu.nl/dist/stratego/channels/strategoxt-unstable


 Description  « Hide
The extra non-utf characters can be found by simply running the stratego-shell:

$ stratego-shell
stratego> import lib
stratego> <newname> "speciaal_groot_woord_1"
"speciaal_groot_woord_0"
stratego> <newname> "speciaal_groot_woord_1"
"speciaal_groot_woord_2"
stratego> <newname> "speciaal_groot_woord_1"
"speciaal_groot_woord_3"
stratego> <newname> "speciaal_groot_woord_1"
"speciaal_groot_woord��������)_0"

The problem seems to be triggerd by the '_'-number at the end, if no number is present, but alpha-chars newname does its magic as expected.


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order:
Martin Bravenboer [2005-03-12 18:41]
Also reported by various PT students.

Using strategoxt-0.14pre9261 (from the nix-channel):
----------------------------------
module foo
imports lib
strategies

main = io-wrap(do)

do = <newname> "foo_0"
rene@tigger:~$ cat foo.str
module foo
imports lib
strategies

main = io-wrap(do)

do = <newname> "foo_0"
----------------------------------
strc -i foo.str -o foo
----------------------------------
$ echo '[]' | ./foo
"foo- p�- _0"
----------------------------------

Rene de Groot [2005-03-16 11:20]
- Fixed by commit in stratego-lib/native/stratego-lib/string.c version 9299

Now to close this issue

Rob Vermaas [2005-03-16 11:22]
well done