Add literal string constants (#19)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
In addition, for the sake of Haskell code generation, this PR adds static typing with Statix. Resolves #5. Co-authored-by: Glen Whitney <glen@studioinfinity.org> Reviewed-on: #19 Co-Authored-By: Glen Whitney <glen@nobody@nowhere.net> Co-Committed-By: Glen Whitney <glen@nobody@nowhere.net>
This commit is contained in:
parent
c516ed6d7f
commit
2772fd0c5c
16 changed files with 386 additions and 34 deletions
|
@ -8,6 +8,14 @@ context-free start-symbols
|
|||
|
||||
Start
|
||||
|
||||
lexical sorts
|
||||
|
||||
STRING_LITERAL
|
||||
|
||||
lexical syntax
|
||||
|
||||
STRING_LITERAL = "'"~[\']*"'"
|
||||
|
||||
context-free sorts
|
||||
|
||||
Start LineSeq Line OptTermEx TermExLst TermEx Ex
|
||||
|
@ -29,13 +37,14 @@ context-free syntax
|
|||
|
||||
TermEx.Terminate = <<Ex>;>
|
||||
|
||||
Ex.Int = INT
|
||||
Ex.Stream = <stream>
|
||||
Ex.Sum = [[Ex] + [Ex]] {left}
|
||||
Ex.Gets = [[Ex] << [Ex]] {left}
|
||||
Ex.To = [[Ex] >> [Ex]] {left}
|
||||
Ex.Int = INT
|
||||
Ex.LitString = STRING_LITERAL
|
||||
Ex.Stream = <stream>
|
||||
Ex.Sum = <<Ex> + <Ex>> {left}
|
||||
Ex.Gets = [[Ex] << [Ex]] {left}
|
||||
Ex.To = [[Ex] >> [Ex]] {left}
|
||||
|
||||
Ex = <(<Ex>)> {bracket}
|
||||
Ex = <(<Ex>)> {bracket}
|
||||
|
||||
context-free priorities
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue