feat: Type-dependent Haskell code generation
Some checks failed
continuous-integration/drone/push Build is failing

Caveat: type is still not being assigned for the Sequence()
  constructor.

  Also fixes the parsing of literal strings (whitespace just after
  the opening quote was being ignored, and was ambiguous just
  before the opening quote).
This commit is contained in:
Glen Whitney 2021-02-16 09:46:12 -08:00
parent 5cd75b8177
commit 804a00902a
6 changed files with 62 additions and 33 deletions

View file

@ -14,7 +14,7 @@ lexical sorts
lexical syntax
STRING_LITERAL = ~[\']*
STRING_LITERAL = "'"~[\']*"'"
context-free sorts
@ -38,7 +38,7 @@ context-free syntax
TermEx.Terminate = <<Ex>;>
Ex.Int = INT
Ex.LitString = <'<STRING_LITERAL>'>
Ex.LitString = STRING_LITERAL
Ex.Stream = <stream>
Ex.Sum = <<Ex> + <Ex>> {left}
Ex.Gets = [[Ex] << [Ex]] {left}