Skip to content

Commit

Permalink
Fix typo causing infinite recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
vvergu committed Jan 13, 2015
1 parent 5016bb6 commit 2b5f130
Showing 1 changed file with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ imports
stratego/aterm/PrettyPrintRules

strategies

io-pp-aterm =
io-stream-wrap(
max-term-size-option + max-depth-option
, system-usage
, system-about
, io-pp-aterm-helper
, io-pp-aterm-helper
)

io-pp-aterm-helper =
Expand All @@ -34,7 +34,7 @@ strategies
ArgOption("--max-term-size"
, where(string-to-int; set-max-term-size-config) ,!
"--max-term-size int
Set the term size from which the verbose
Set the term size from which the verbose
pretty printing must be used [8]"
)

Expand Down Expand Up @@ -65,11 +65,11 @@ strategies
pp-aterm =
pp-aterm-box
; box2text-string(|80)
pp-aterm-box(|maxtermsize) =

pp-aterm(|maxtermsize) =
pp-aterm-box(|maxtermsize)
; box2text-string(|80)

pp-aterm-stream(|stream) =
pp-aterm-stream(|8, stream)

Expand All @@ -79,14 +79,14 @@ strategies
; box2text-stream(|80, stream)
; <fputs> ("\n", stream)

strategies
strategies

/**
* Escaping special characters in strings
* model after
* model after
* 'static int symbolTextSize(Symbol sym)'
* in aterm.c (aterm-2.3.1)
*
*
*/
aterm-escape-strings =
topdown(try(aterm-escape-string))
Expand All @@ -99,18 +99,17 @@ strategies
escape-chars(
Escape-backslash
+ Escape-double-quote
+ Escape-linefeed
+ Escape-linefeed
+ \ ['\t' | cs ] -> ['\', 't' | cs ] \
+ Escape-carriage-return
)
)
; ?s2

/**
* Convenience strategy for pretty printing a term
*
* @param Int width of the column to use for pretty printing
* @type Term -> String
*/
pp-aterm(|width) = aterm-escape-string; pp-aterm-box; box2text-string(|width)

0 comments on commit 2b5f130

Please sign in to comment.