File tree 8 files changed +21
-8
lines changed
8 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ si-prefixes count 2/ + Constant zero-exp
187
187
188
188
[ifdef] r:fail
189
189
: flit, postpone Fliteral ;
190
- ' noop ' flit, ' flit, recognizer: r:float
190
+ ' noop ' flit, ' flit, recognizer r:float
191
191
192
192
: rec:float ( addr u -- r r:float | r:fail )
193
193
\G recognize floating point numbers
Original file line number Diff line number Diff line change @@ -669,12 +669,14 @@ defer 0-adjust-locals-size ( -- )
669
669
\ concat two xts into one
670
670
>r >r :noname r> compile, r> compile, postpone ; ;
671
671
672
- : recognizer: ( int-xt comp-xt post-xt "name" -- )
672
+ : recognizer ( int-xt comp-xt post-xt "name" -- )
673
673
\G create a new recognizer table
674
674
>r ['] drop swap concat >r
675
675
>r :noname r> compile, postpone ;
676
676
r> set-compiler r> set-lit, Constant ;
677
677
678
+ ' recognizer alias recognizer: \ old name, deprecated
679
+
678
680
\ does>
679
681
680
682
: doesxt, ( xt -- )
Original file line number Diff line number Diff line change @@ -28,6 +28,6 @@ Defer postpone-notfound1 ( addr u -- )
28
28
' no.extensions is postpone-notfound1
29
29
30
30
' interpret-notfound1 ' compiler-notfound1 ' postpone-notfound1
31
- recognizer: r:notfound
31
+ recognizer r:notfound
32
32
33
33
r:notfound get-recognizers 1+ set-recognizers
Original file line number Diff line number Diff line change 17
17
\ You should have received a copy of the GNU General Public License
18
18
\ along with this program. If not, see http://www.gnu.org/licenses/.
19
19
20
- ' (int-to) ' (comp-to) ' lit, recognizer: r:to
20
+ ' (int-to) ' (comp-to) ' lit, recognizer r:to
21
21
22
22
: rec:to ( addr u -- xt r:to | r:fail )
23
23
2dup s" ->" string-prefix? 0= IF 2drop r:fail EXIT THEN
Original file line number Diff line number Diff line change 23
23
24
24
: slit, postpone sliteral ;
25
25
26
- ' noop ' slit, dup recognizer: r:string
26
+ ' noop ' slit, dup recognizer r:string
27
27
28
28
: rec:string ( addr u -- addr u' r:string | r:fail )
29
29
2dup s\" \" " string-prefix?
34
34
35
35
0 [IF] \ dot-quoted strings, we don't need them
36
36
: .slit slit, postpone type ;
37
- ' type ' .slit ' slit, recognizer: r:."
37
+ ' type ' .slit ' slit, recognizer r:."
38
38
39
39
: rec:." ( addr u -- addr u' r:." | addr u r:fail )
40
40
2dup ".\"" string-prefix?
Original file line number Diff line number Diff line change 19
19
20
20
: env$, ( addr u -- ) slit, postpone getenv ;
21
21
22
- ' getenv ' env$, ' slit, recognizer: r:env
22
+ ' getenv ' env$, ' slit, recognizer r:env
23
23
24
24
: rec:env ( addr u -- addr u r:env | r:fail )
25
25
over c@ '$' <> IF 2drop r:fail EXIT THEN
Original file line number Diff line number Diff line change 19
19
20
20
: >system ( addr u -- ) cr system ;
21
21
: system, slit, postpone >system ;
22
- ' >system ' system, ' slit, recognizer: r:eval
22
+ ' >system ' system, ' slit, recognizer r:eval
23
23
24
24
: rec:shell ( addr u -- addr u' r:string )
25
25
\G evaluate string + rest of command line
Original file line number Diff line number Diff line change @@ -586,6 +586,17 @@ s" help.txt" open-fpath-file throw 2drop slurp-fid save-mem-dict
586
586
2>r : help ( -- ) [ 2r> ] 2literal type ; \ gforth
587
587
\G Print some help for the first steps
588
588
589
+ \ r:word and r:name
590
+
591
+ :noname drop execute ;
592
+ :noname 0> IF execute ELSE compile, THEN ;
593
+ :noname postpone 2literal ;
594
+ recognizer r:word ( takes xt +/-1, i.e. result of find and search-wordlist )
595
+
596
+ :noname r>int execute ;
597
+ :noname r>comp execute ;
598
+ ' lit,
599
+ recognizer r:name ( takes nt, i.e. result of find-name and find-name-in )
589
600
590
601
\ growing buffers that need not be full
591
602
You can’t perform that action at this time.
0 commit comments