\switch +gump
\insert gump/examples/LambdaScanner.ozg

local
   MyScanner = {New LambdaScanner init()}
   proc {GetTokens} T V in
      {MyScanner getToken(?T ?V)}
      case T of 'EOF' then
	 {System.showInfo 'End of file reached.'}
      else
	 {System.show T#V}
	 {GetTokens}
      end
   end
in
   {MyScanner scanFile('Lambda.in')}
   {GetTokens}
   {MyScanner close()}
end
