Created
April 9, 2011 11:26
-
-
Save railsfactory/911325 to your computer and use it in GitHub Desktop.
script to parse stdin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
^^^^^^^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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