aboutsummaryrefslogtreecommitdiff
path: root/src/boot/scanner.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2012-05-23 02:49:30 +0000
committerdos-reis <gdr@axiomatics.org>2012-05-23 02:49:30 +0000
commita8faa740f1e13fce63ac23326a227655bca7a0b2 (patch)
treea4d6165c93449b677aaaa45e609131546198fb1b /src/boot/scanner.boot
parenteae4d54c648d019b9db583b4e8d2c432f8d7bb16 (diff)
downloadopen-axiom-a8faa740f1e13fce63ac23326a227655bca7a0b2.tar.gz
* boot/tokens.boot (%Token): New datatype.
(makeToken): New. * boot/includer.boot: Use %token accessors. * boot/parser.boot: Likewise. * boot/pile.boot: Likewise. * boot/scanner.boot: Likewise. * boot/utility.boot: Export subString.
Diffstat (limited to 'src/boot/scanner.boot')
-rw-r--r--src/boot/scanner.boot24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/boot/scanner.boot b/src/boot/scanner.boot
index 05a253a1..f283d08a 100644
--- a/src/boot/scanner.boot
+++ b/src/boot/scanner.boot
@@ -1,6 +1,6 @@
-- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
-- All rights reserved.
--- Copyright (C) 2007-2011, Gabriel Dos Reis.
+-- Copyright (C) 2007-2012, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -60,22 +60,6 @@ dqToList s ==
s = nil => nil
first s
-shoeTokConstruct(x,y,z) ==
- [x,y,:z]
-
-shoeConstructToken(lp,b,n) ==
- shoeTokConstruct(b.0,b.1,[lp,:n])
-
-shoeTokType x ==
- first x
-
-shoeTokPart x ==
- second x
-
-shoeTokPosn x ==
- [.,.,:p] := x
- p
-
shoeNextLine s==
bStreamNull s => false
$linepos := s
@@ -104,7 +88,7 @@ shoeLineToks s ==
$n = nil => shoeLineToks $r
stringChar($ln,0) = char ")" =>
command := shoeLine? $ln =>
- dq := dqUnit shoeConstructToken($linepos,shoeLeafLine command,0)
+ dq := dqUnit makeToken($linepos,shoeLeafLine command,0)
[[dq],:$r]
command := shoeLisp? $ln => shoeLispToken($r,command)
shoeLineToks $r
@@ -120,7 +104,7 @@ shoeLispToken(s,string)==
ln := $ln
linepos := $linepos
[r,:st] := shoeAccumulateLines(s,string)
- dq := dqUnit shoeConstructToken(linepos,shoeLeafLisp st,0)
+ dq := dqUnit makeToken(linepos,shoeLeafLisp st,0)
[[dq],:r]
shoeAccumulateLines(s,string)==
@@ -168,7 +152,7 @@ shoeToken() ==
[]
shoeError()
b = nil => nil
- dqUnit shoeConstructToken(linepos,b,n)
+ dqUnit makeToken(linepos,b,n)
-- to pair badge and badgee
shoeLeafId x ==