summaryrefslogtreecommitdiff
path: root/src/nbc/substitution.sml
diff options
context:
space:
mode:
authorCalvin <calvin@EESI>2013-05-28 10:47:11 -0400
committerCalvin <calvin@EESI>2013-05-28 10:47:11 -0400
commitdd38d0d1dda2be42bf280aeca110542f2f2fef1b (patch)
treec921dc0690e29f1b7b913aaa72b9c12539faa5a1 /src/nbc/substitution.sml
parent2f33e34ae06b96c3f3e4456ce960172903f60bfb (diff)
removed files
Diffstat (limited to 'src/nbc/substitution.sml')
-rw-r--r--src/nbc/substitution.sml26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/nbc/substitution.sml b/src/nbc/substitution.sml
deleted file mode 100644
index 57d55cf..0000000
--- a/src/nbc/substitution.sml
+++ /dev/null
@@ -1,26 +0,0 @@
-signature SUBSTITUTION = sig
- val substitute: (string -> string) -> string -> string option
-end
-
-structure Substitution :> SUBSTITUTION = struct
- structure LrVals = SubstitutionGrmLrValsFun (structure Token = LrParser.Token)
- structure Lex = SubstitutionLexFun (structure Tokens = LrVals.Tokens)
- structure Parser = JoinWithArg (
- structure ParserData = LrVals.ParserData
- structure Lex = Lex
- structure LrParser = LrParser
- )
- fun substitute lookup source =
- let
- val position = ref 0
- val instream = TextIO.openString source
- fun read n = TextIO.inputN (instream, n)
- val lexer = Parser.makeLexer read (ref 0)
- fun error (_, _, _) = ()
- val (result, _) = Parser.parse (0, lexer, error, lookup)
- val () = TextIO.closeIn instream
- in
- SOME result
- end
- handle Parser.ParseError => NONE
-end