Extend the expression language abstract syntax and the lexer and parser specifications with conditional expressions. The abstract
Fantastic news! We've Found the answer you've been seeking!
Question:
Extend the expression language abstract syntax and the lexer and parser specifications with conditional expressions. The abstract syntax should be If(e1, e2, e3), so modify file Absyn.fs as well as ExprLex.fsl and file ExprPar.fsy. The concrete syntax may be the keyword-laden F#/ML-style:
if e1 then e2 else e3
or the more light-weight C/C++/Java/C#-style:
e1 ? e2 : e3
Some documentation for fslex and fsyacc is found in this chapter and in Expert F# [17].
Posted Date: