From 6c9b37fd68b558bced11d67cfc798ca96800bc79 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Tue, 29 May 2012 23:50:08 +0000 Subject: * boot/parser.boot (%ParserState): New. (makeParserState): Likewise. (%Translator): Likewise. (makeTranslator): Likewise. Make all parsing functions take a parser state argument. * boot/translator.boot (shoeOutParse): Adjust. * interp/spad-parser.boot (stringPrefix?): Remove redudant definition. --- src/interp/spad-parser.boot | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/interp') diff --git a/src/interp/spad-parser.boot b/src/interp/spad-parser.boot index 266d966c..ff9051ed 100644 --- a/src/interp/spad-parser.boot +++ b/src/interp/spad-parser.boot @@ -48,7 +48,6 @@ namespace BOOT module spad_-parser where indentationLocation: %String -> %Maybe %Short - stringPrefix?: (%String,%String) -> %Boolean --% @@ -79,12 +78,6 @@ indentationLocation line == tabChar? line.i => loc := 8 * (loc quo 8 + 1) return loc -++ Return true if the string `s1' is a prefix of `s2'. -stringPrefix?(s1,s2) == - n1 := #s1 - n1 > #s2 => false - and/[s1.i = s2.i for i in 0..(n1-1)] - skipIfBlock x == [n,:line] := z := preparseReadLine1 x not string? line => z -- cgit v1.2.3