Where can I find the Grammar for the Isabelle Theory files (as BNF or something similar)?
I started searching at https://isabelle-dev.sketis.net/source/isabelle/browse/default/src/Tools/, but it seems like I'm in the wrong place
As the grammar can be extended on the fly, there is no BNF…
Although print_syntax
gives you something that is not to far from a grammar specification and reflects the current state of known syntax.
I tried it, but it seems to give only the inner syntax. Is there a version for the outer syntax?
That might be tricky because when you create a new tactic, command, or attribute you can specify a parser as arbitrary ML code.
But even for the inner syntax, there are parse translations that can modify the parsed inner syntax AST and the inner syntax arbitrarily. But I suppose there is at least some kind of grammar for the inner syntax AST…
Yes, print_syntax
is inner syntax only. It also lists the parse_translation
s, but of course not what they actually do (arbitrary ML code).
Last updated: Dec 21 2024 at 16:20 UTC