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) [] ' "" ['" "', '""'] 规格 您需要处理的三种类型是: 弦乐,什么内"" 数字,任何数字序列 运算符,除空格外的任何其他单个字符 除非将其留在字符串中或将两个数字分隔开,否则实际上将忽略空格。 字符串/字符规范: 字符串以分隔",当\遇到时,下一个字符应转义。 字符前面加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