aboutsummaryrefslogtreecommitdiff
path: root/src/interp/lexing.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2012-06-07 04:02:54 +0000
committerdos-reis <gdr@axiomatics.org>2012-06-07 04:02:54 +0000
commitd03a3c6cb297be5f5b7726c2f346075d41faad1d (patch)
treeced95206d3aa122ce08b03c870f584c8be66be69 /src/interp/lexing.boot
parenta4b48cade8c5a9ae034cfd1cfcd21739bcab7ce5 (diff)
downloadopen-axiom-d03a3c6cb297be5f5b7726c2f346075d41faad1d.tar.gz
* interp/lexing.boot: Move %Line to io.boot.
* interp/debug.lisp (SPAD_LONG_ERROR): Take a reader parameter. Tidy.
Diffstat (limited to 'src/interp/lexing.boot')
-rw-r--r--src/interp/lexing.boot54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/interp/lexing.boot b/src/interp/lexing.boot
index a5d71f15..d5917620 100644
--- a/src/interp/lexing.boot
+++ b/src/interp/lexing.boot
@@ -42,60 +42,6 @@ namespace BOOT
module lexing
---%
---% Line abstract datatype
---%
-structure %Line ==
- Record(buf: %String, cchar: %Char, cidx: %Short,
- lidx: %Short, no: %Short) with
- lineBuffer == (.buf) -- input string buffer
- lineCurrentChar == (.cchar) -- current character
- lineCurrentIndex == (.cidx) -- current index
- lineLastIndex == (.lidx) -- last valid index
- lineNumber == (.no) -- line number
-
-
-makeLine(buf == makeString 0, ch == charByName "Return",
- curIdx == 1, lstIdx == 0, no == 0) ==
- mk%Line(buf,ch,curIdx,lstIdx,no)
-
-lineClear! l ==
- lineBuffer(l) := makeString 0
- lineCurrentChar(l) := charByName "Return"
- lineCurrentIndex(l) := 1
- lineLastIndex(l) := 0
- lineNumber(l) := 0
-
-++ Sets string to be the next line stored in line
-lineNewLine!(s,l,no == nil) ==
- sz := #s
- lineLastIndex(l) := sz - 1
- lineCurrentIndex(l) := 0
- lineCurrentChar(l) := sz > 0 and s.0 or charByName '"Return"
- lineBuffer(l) := s
- lineNumber(l) := no or (lineNumber l + 1)
-
-++ Tests if line is empty or positioned past the last character
-lineAtEnd? l ==
- lineCurrentIndex l >= lineLastIndex l
-
-++ Tests if line is empty or positioned past the last character
-linePastEnd? l ==
- lineCurrentIndex l > lineLastIndex l
-
-++ Buffer from current index to last index
-lineCurrentSegment l ==
- lineAtEnd? l => makeString 0
- subSequence(lineBuffer l,lineCurrentIndex l,lineLastIndex l)
-
-lineNextChar l ==
- lineBuffer(l).(1 + lineCurrentIndex l)
-
-lineAdvanceChar! l ==
- n := lineCurrentIndex l + 1
- lineCurrentIndex(l) := n
- lineCurrentChar(l) := lineBuffer(l).n
-
++ List of lines returned from preparse
$lineStack := nil