All pastes #831215 Raw Edit

Anonymous

public text v1 · immutable
#831215 ·published 2007-12-24 18:21 UTC
rendered paste body
Testing Swerve tokenizer...
---------------
buffer to parse: 
identifier(arg1, arg2, ...) => do: 
        while:
        ;
;
test = 1
moo => 1

symbol          value           line            column
------          -----           ----            ------
13              identifier              1               9
45                              1               10
10              arg1            1               14
22                              1               15
10              arg2            1               20
22                              1               21
25                              1               25
46                              1               26
23                              1               29
10              do              1               32
19                              1               33
10              while           2               6
19                              2               7
20                              3               2
20                              4               1
11              test            5               4
24                              5               7
2               1               5               9
12              moo             5               12
23                              5               15
2               1               5               18


Testing Swerve parser...
---------------
buffer to parse: 
identifier(arg1, arg2, ...) => do: 
        while:
        ;
;
test = 1
moo => 1

statement 
        value: identifier
        value: identifier
        value: identifier
        statement is function definition 
current token: (null)
Expecting 45
        Found 45
        function arguments 
        value: arg1
        value: arg2
Expecting 46
        Found 46
Expecting 23
        Found 23
        procedure 
        value: do
        value: do
statement 
        value: do
        statement is identifier or lambda 
block 
statement 
        value: while
        statement is identifier or lambda 
block 
statement 
Expecting 20
        Found 20
end block
Expecting 20
        Found 20
end block
Done!