Skip to content

Instantly share code, notes, and snippets.

@railsfactory
Created April 9, 2011 11:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save railsfactory/911325 to your computer and use it in GitHub Desktop.
Save railsfactory/911325 to your computer and use it in GitHub Desktop.
script to parse stdin
Senthil-3:stdin senthil$ mirahc parse.mirah
Parsing...
parse.mirah
Inferring types...
Inference Error:
parse.mirah:7: Cannot find class InputStreamReader
inStream = InputStreamReader.new(System.in)
^^^^^^^^^^^^^^^^^^
parse.mirah:8: Cannot find class BufferedReader
stdin = BufferedReader.new(inStream)
^^^^^^^^^^^^^^^
puts "parse stdin"
import java.io.*
import java.io.InputStreamReader
import java.io.BufferedReader
inStream = InputStreamReader.new(System.in)
stdin = BufferedReader.new(inStream)
#stdin = BufferedReader.new(InputStreamReader.new(System.in))
#puts stdin.readLine()
puts System.in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment