Zulip Chat Archive
Stream: new members
Topic: where are parsers/grammar for def, inductive, etc defined?
Mark Aagaard (Feb 10 2025 at 20:08):
I'm trying to understand the grammar and the various parsers that are used by def
and inductive
. Is there source code where the parsers for these commands are defined?
-mark
Vlad Tsyrklevich (Feb 10 2025 at 20:15):
I believe you're looking for https://github.com/leanprover/lean4/blob/93d4ae6635c0c755c9f7368f9b99483d4557b7a6/src/Lean/Parser/Command.lean#L140
Kyle Miller (Feb 10 2025 at 20:17):
If you have the Lean package imported, then in VS Code you can right click on, for example, def
, and then "Go to declaration" to get to the syntax declaration.
Mark Aagaard (Feb 10 2025 at 21:19):
Vlad and Kyle: Thanks!
-mark
Last updated: May 02 2025 at 03:31 UTC