Skip to content
暴風型言語
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
bin
examples
lib
test
README.mkdn
README_ja.mkdn

README.mkdn

Typhon is Typhoon Language

  • Esoteric Language
  • Making via "Rubyで作る奇妙なプログラム言語" ## Anagram of Python
  • But...Create of Ruby... ### One day I remake to Python. # Concept of Typhon
  • Typhoon came to Okinawa in Japan after so long.
  • "@" seems like Typoon clouds.
  • Typhon is based on WhiteSpace (such as stack model language) ## Typhon examples aaa@aa@aaa @ aaaaa@@a@aa@ @ aa ## execution result Hi # USAGE > ruby bin/typhon examples/hi.ty

文法

※ _is Space

Typhon|Middle language|explain -|-|- aa#{NUM}|pushNUM|add to stack a_a|dup|dup top of stack value a@a#{NUM}|copyNUM|copy stack value a_@|swap|swap stack value a__|discard|drop top of stack value a@_#{NUM}|slide|drop stack value top to NUM @aaa|add|calcurate add @aa@|sub|calcurate sub @aa_|mulcalucurate multi @a@a|div|calucurate div @a@@|mod|calucurate mod @@__|heap_write|write to heap @@@_|heap_read|read from heap aa#{LABEL}|labelLABEL|set to label a@#{LABEL}|callLABEL|call Subroutine a_#{LABEL}|jumpLABEL|jump to label @a#{LABEL}|jump_zeroLABEL|jump to label when top of stacks value is zero @@#{LABEL}|jump_negativeLABEL|jump to label when top of stacks value is negative @_|return|return to Subroutine ___|exit|exit program @_aa|char_out|output char to standard I/O @_a@|num_out|output number to standard I/O @_@_|char_in|input char from standard I/O @_@@|num_in|input number from standard I/O

Numbers are depiction of binary

e.g aa@a@ -> +0101 -> 5
    @@a@a -> -1010 -> -10

LABEL is same as number

Something went wrong with that request. Please try again.