| 1 | define-library((front,state), |
| 2 | export(count,bump!,next,literal,token), |
| 3 | import((scheme,base)), { |
| 4 | count := 0 |
| 5 | token := 1 |
| 6 | bump!() := {count=count+1, count} |
| 7 | define-syntax(next,syntax-rules((),((_,),bump!()))) |
| 8 | define-syntax(literal, |
| 9 | syntax-rules((token,),((_,token),#t),((_,other),#f))) |
| 10 | }) |
| 11 | define-library((front,aliases), |
| 12 | export(rename(count,shared),bump!), |
| 13 | import(only((front,state),count,bump!))) |
| 14 | count := 999 |
| 15 | bump! := #f |
| 16 | token := 1 |
| 17 | import(prefix((front,aliases),a:), |
| 18 | rename(except((front,state),count,bump!),(token,renamed-token))) |
| 19 | first := next() |
| 20 | second := a:bump!() |
| 21 | third := next() |
| 22 | e := environment(quote(only((scheme,base),+))) |
| 23 | list(first,second,third,a:shared,count, |
| 24 | literal(renamed-token),literal(token), |
| 25 | eval(quote(+(20,22)),e), |
| 26 | cond-expand((and(vile,library((front,state))),quote(present)),(else,quote(missing)))) |
| 27 | |