feat: Type-dependent Haskell code generation
Some checks failed
continuous-integration/drone/push Build is failing
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:
parent
5cd75b8177
commit
804a00902a
6 changed files with 62 additions and 33 deletions
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue