Command: Annotate - siegebell/vscoq GitHub Wiki
Parses plainText
and returns structured parsing annotations (annotations
), using character offsets to refer back to plainText
.
<call val="Annotate"><string>${plainText}</string></call>
<value val="good">${annotations}</value>
Given <call val="Annotate"><string>Theorem plus_0_r : forall n : nat, n + 0 = n.</string></call>
.
Returns:
<value val="good">
<pp startpos="0" endpos="45">
<vernac_expr startpos="0" endpos="44">
<keyword startpos="0" endpos="7">Theorem</keyword>
plus_0_r :
<constr_expr startpos="19" endpos="44">
<keyword startpos="19" endpos="25">forall</keyword>
n :
<constr_expr startpos="30" endpos="33">nat</constr_expr>
,
<unparsing startpos="35" endpos="44">
<unparsing startpos="35" endpos="40">
<unparsing startpos="35" endpos="40">
<unparsing startpos="35" endpos="36">
<constr_expr startpos="35" endpos="36">n</constr_expr>
</unparsing>
<unparsing startpos="36" endpos="38"> +</unparsing>
<unparsing startpos="38" endpos="39"> </unparsing>
<unparsing startpos="39" endpos="40">
<constr_expr startpos="39" endpos="40">0</constr_expr>
</unparsing>
</unparsing>
</unparsing>
<unparsing startpos="40" endpos="42"> =</unparsing>
<unparsing startpos="42" endpos="43"> </unparsing>
<unparsing startpos="43" endpos="44">
<constr_expr startpos="43" endpos="44">n</constr_expr>
</unparsing>
</unparsing>
</constr_expr>
</vernac_expr>
.
</pp>
</value>