Skip to content

intresrl/RxKotlin-REPL

Repository files navigation

RxKotlin REPL

This is an example using RxKotlin to implement a simple REPL.

The supported commands are:

  • history (or hist)
    • display previously executed commands
    • commands ending with "ck" are excluded (to emulate a profanity filter)
    • consecutive duplicates are displayed only once
  • exit
    • ends application
  • any arithmetic expression using integers and operators +, -, *, /
    • display the result of the operation as though it were evaluated in Javascript;
  • anything else
    • just echo the command

There are two executable Kotlin files:

  • Repl.kt starts the interactive REPL shell;
  • FileRunner.kt reads a list of commands from file commands.txt and executes them in sequence.

About

Simple REPL implemented with RxKotlin.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages