Skip to content

Parse trees are in source order instead of argument order #170

@digama0

Description

@digama0

Not all metamath term constructors take their arguments in source order. An important example is wal $p A. x ph $., which has x before ph in source order but because wph $f wff ph $. is declared before vx $f setvar x $., the actual argument order is wal(ph, x), which is visible in syntax proofs in the database.

Currently, grammar.rs does not handle this situation correctly, and always adds the arguments to the tree in source order, resulting in ill formed trees of the form wal(x, ph). This is the source of one of the errors reported at digama0/mm-hammer#1 .

cc: @tirix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions