Message Boards Message Boards

`UndocumentedTestFEParserPacket` vs. `ReparseBoxStructurePacket`?

What is the difference between UndocumentedTestFEParserPacket and ReparseBoxStructurePacket?

I am aware of John Fultz’s explanation of UndocumentedTestFEParserPacket on SE. But I don’t understand its relationship to ReparseBoxStructurePacket.

POSTED BY: Robert Jacobson

This is only an observation, those functions do not need to be internally related at all.

So I'd say that:

FrontEnd`UndocumentedTestFEParserPacket[input_String, strip:(True|False)
]:={
  BoxData @ 
    If[strip, StripBoxes, Identity]  @ 
      FrontEnd`ReparseBoxStructurePacket[input]
, StandardForm
}

additionally FrontEnd`ReparseBoxStructurePacket can also take a box expression as input, while FrontEnd`UndocumentedTestFEParserPacket can only handle strings.

FrontEndExecute @  
  FrontEnd`ReparseBoxStructurePacket @
    RowBox[{"Test", "[", "Test", "[", "1", "]", "]"}]

(* Out[]:= RowBox[{"Test", "[", RowBox[{"Test", "[", "1", "]"}], "]"}] *)

Nice question btw, thanks.

POSTED BY: Kuba Podkalicki
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract