BlackBox Component Builder
Download  Extensions  GitHub  Chat  Wiki  Forum  Support 

Prettify

Coco pretty-printer grammars for Component Pascal.
Depends on: Coco
Details:

Prettify provides 3 pretty printer (PP) tools for formatting correct Component Pascal programs:

Formatting with comment output (ComponentPascalC.atg)
Remove End Comments (RemoveEndComments.atg)
Remove All Comments (ComponentPascalNC.atg).

The Prettify commands accept a pre-comment, which precedes the start of a module. Post text, which follows a Component Pascal module, is also accepted. Post text is converted into a comment by enclosing it with open and close comment delimiters.

When formatting, Prettify commands unfortunately remove hyperlinks, commander tool buttons, etc. present in the input.

Colorization is deliberately exaggerated to show program structure: reserved words and punctuation, etc. The main function of the pretty-printers are to insert line breaks and perform indentation of program structures. It is recommended, as a final step, to run Cpc -> "Beautify" on the output of Prettify commands.

The tools use modified Coco scanners. Extended Latin-1 characters are allowed in identifiers. Additionally, Unicode is allowed in strings and comments. Comments can contain horizontal tab (9X), cr (0DX) and para (0EX) characters. Strings can contain horizontal tab characters.

The behavior of the pretty-printers are controlled by the embedded semantic actions in the respective Coco (ATG) grammars. If changes to formatting are desired, this is the only portion of a grammar that should be modified.

Download
Author: Carl Glassberg
Published by: Anton Shelin
Русский English

Authorization

Publish your extensions for
BlackBox Component Builder.

Sign up
Username:

Password:

remember me