summaryrefslogtreecommitdiffstats
path: root/tcllib/modules/pt/include/example/parser_use.inc
blob: 266740a1ebd80d91f0e5301c509cc4e0b1513206 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
[example {
    package require calculator

    lassign $argv input
    set channel [open $input r]

    set parser [calculator]
    set ast [$parser parse $channel]
    $parser destroy
    close $channel

    ... now process the returned abstract syntax tree ...
}]