Skip to content

Latest commit

 

History

History
61 lines (50 loc) · 1.99 KB

File metadata and controls

61 lines (50 loc) · 1.99 KB

Strings

  • Strings/Chars in lexer.mll and parser.mly -- multi-line strings?
  • EString, ImmString
  • Allocation
  • GC: need to sweep strings (copy/paste tuple case again?)
  • Char doesn't need a whole word
  • get at index for strings
  • Concatenation -- str1 ^ str2
  • charToInt, intToChar | chr, ord
  • String equality
  • slicing
  • Build out a string library
    • toString
    • split
    • comparison (but not defined as primops)
    • isPrefix
  • escape sequence printing
  • test a bunch of random special characters via ascii code and direct usage

Compilation

  • Readdress the tagging pattern
    • use the LSB of arity to delineate
  • Create and store strings on heap (return the heap_reg, ofc)
  • Tuple indexing and other existing things must not accept strings
  • Tag error checks for prim ops -- concatenation needs to check for string tag for left and right

Implement the functionality to demo

  • Caesar cipher (input, string get at index, len, ord, chr, concat)
  • reverse a string [::-1] (input, slicing)
  • Pig Latin (input, slicing, len, concat, split)
  • Sort a list of strings (input, comparison, split)

Testing

  • Make sure existing prim ops do/don't allow strings appropriately - D

Presentation

  • write substantial documentation - D
  • Write down where each string operation in STRINGS.md lives within input/ dir - D
  • Write some agenda notes
  • Highlight important design decisions (see DECISIONS.md) - D
  • Well-defined and Heavily Detailed README - D then J -- usage examples -- supported language features -- high-level description -- snake puns (maybe a snake starting with S?)
  • revive test.ml - D
  • Investigate GC seg faults
  • revive existing integration tests - J
  • write new integration tests - J

Other Ideas

  • Support strings as input