need a true stream instead of InputStream (python)

11 views
Skip to first unread message

Hiroki Horiuchi

unread,
Dec 16, 2019, 4:22:29 AM12/16/19
to antlr-discussion

Hello.


This question was first asked on StackOverflow (wrong place) and rejected.

Now knowing that here is the right place to do so,

I will repeat almost the same question.


I'm trying to create a REPL of Lisp with ANTLR in Python.
For that, an interactive, infinite stream that behaves like `InputStream` is required.
But there seems no such stream in the Python runtime.
`InputStream` itself or `FileStream` is not what I want. 

Implementing the required stream is beyond my skill.
Is there such a class already written?


Thank you,

Hiroki

Eric Vergnaud

unread,
Dec 16, 2019, 10:34:22 AM12/16/19
to antlr-di...@googlegroups.com
Not sure why you think it’s ‘required’...
A REPL produces lines, each of which can be used as an input for a new instance of the parser...

Envoyé de mon iPhone

Le 16 déc. 2019 à 10:22, Hiroki Horiuchi <x19...@gmail.com> a écrit :


--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/antlr-discussion/cc717266-8450-44c1-a92c-1c2d2b8d3d11%40googlegroups.com.

Hiroki Horiuchi

unread,
Dec 17, 2019, 8:13:25 PM12/17/19
to antlr-discussion
Thanks, You are right.

Hiroki
Reply all
Reply to author
Forward
0 new messages