3
スタックベースの言語をトークン化する
私は、に取り組んできた別のと呼ばれるスタックベースのゴルフの言語Stackgoat。この課題では、Stackgoat(または実際には一般的なスタックベースの言語)のTokenizerを作成します。 例 "PPCG"23+ ["PPCG", '23', '+'] 'a "bc" + ['"a"', '"bc"', '+'] 12 34+-"abc\"de'fg\\" ['12', '34', '+', '-', '"abc\"de'fg\\"'] "foo ['"foo"'] (empty input) [] ' "" ['" "', '""'] 仕様 処理する必要がある3つのタイプは次のとおりです。 ストリングス、何も内"" 数字、数字列 演算子、空白以外の任意の単一文字 空白は、文字列内にあるか、2つの数値を区切っていない限り、本質的に無視されます。 文字列/文字仕様: 文字列はで区切られ、が検出された"場合\、次の文字をエスケープする必要があります。 '文字はa で始まり、その後の'文字は文字列リテラルに変換されます。'a->"a" ' 常にその後に文字があります 終値を自動挿入する必要があります ルール: の形式evalは許可されません 入出力: 入力は、STDIN、関数パラメーター、または同等の言語を通じて取得できます。 出力は、配列または言語に最も近いものでなければなりません。
15
code-golf
parsing
code-golf
hexagonal-grid
code-golf
string
code-golf
string
code-golf
combinatorics
code-golf
ascii-art
code-golf
string
game
counting
code-golf
arithmetic
complex-numbers
code-golf
string
code-golf
decision-problem
hexagonal-grid
code-golf
string
sequence
code-golf
number
arithmetic
code-golf
ascii-art
code-golf
ascii-art
code-golf
string
arithmetic
code-golf
number
simulation
code-golf
number
arithmetic
code-golf
string
sequence
unicode
code-golf
string
ascii-art
balanced-string
code-golf
number
clock
code-golf
ascii-art
number
code-golf
math
number
sequence
code-golf
string
ascii-art
balanced-string
code-golf
math
string
popularity-contest
graphical-output
image-processing
code-golf
string
permutations
code-golf
string
code-golf
random
code-golf
string
cryptography
palindrome
code-golf
chess
code-golf
math
array-manipulation
topology
code-golf
math
sequence
code-golf
keyboard
classification
code-golf
string
sequence
code-golf
natural-language
code-golf
math
number
sequence
sorting
code-golf
sequence
combinatorics
grid
tic-tac-toe
code-golf
geometry
code-golf
number
restricted-source
new-years
expression-building