Message Boards Message Boards

GROUPS:

`UndocumentedTestFEParserPacket` vs. `ReparseBoxStructurePacket`?

Posted 2 months ago
339 Views
|
1 Reply
|
3 Total Likes
|

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.

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.

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