/unmaintained/sandbox/syntax/syntax.factor

http://github.com/abeaumont/factor · Factor · 26 lines · 15 code · 8 blank · 3 comment · 1 complexity · abe91afa9f4f1efd0bec12f0f049ad48 MD5 · raw file

  1. ! Copyright (C) 2009 Maxim Savchenko.
  2. ! See http://factorcode.org/license.txt for BSD license.
  3. USING: kernel sequences assocs namespaces lexer vocabs.parser sandbox ;
  4. IN: sandbox.syntax
  5. <PRIVATE
  6. ERROR: sandbox-error vocab ;
  7. : sandbox-use+ ( alias -- )
  8. dup whitelist get at [ add-use ] [ sandbox-error ] ?if ;
  9. PRIVATE>
  10. SYNTAX: APPLY: scan sandbox-use+ ;
  11. SYNTAX: APPLYING: ";" parse-tokens [ sandbox-use+ ] each ;
  12. REVEALING:
  13. ! #!
  14. HEX: OCT: BIN: f t CHAR: "
  15. [ { T{
  16. ] } ;
  17. REVEAL: ;