Mentions légales du service

Skip to content
Snippets Groups Projects
François Pottier's avatar
POTTIER Francois authored
I introduced this problem in a previous commit where I wanted to share the
lexer between several demos.
860d3574
History

In this variant of the calc demo, the parser's semantic actions are parameterized over a structure, called Semantics, which defines how numbers should be interpreted. The parser is later instantiated with floating-point numbers, so the calculator actually performs floating-point evaluation -- but the grammar specification is independent of this detail.