Zulip Chat Archive

Stream: metaprogramming / tactics

Topic: Parsing floats for a DSL


Danaël Carbonneau (Oct 23 2025 at 12:20):

For a small project, i want to emebed a small DSL with probabilistic constructs (in order to be able to extract an AST), I followed a small tutorial (using the elaborator), but i'm stuck on how to deal with floats (i really need them since i'm working with probabilistic constructs...), it's not mentionned in the file that defines numeric literals (Parser/Extra.lean). Is there an easy way to parse floats ?

Damiano Testa (Oct 23 2025 at 13:32):

Does docs#Lean.Parser.scientificLit help?

Danaël Carbonneau (Oct 23 2025 at 14:24):

I think that it might be my last resort...


Last updated: Dec 20 2025 at 21:32 UTC