|
How Dose SourceFormatX Work? |
|
| |
A source code formatter accepts a source code file,
and generates another equivalent source code file which is nicely reformatting according to the source language
syntax or your customization options, including code blocks indentation, normalized case for keywords and
identifiers, line wrapping, comment style transformation etc.
|
|
Many conventional source code formatting tools use special string processing methods to implement the
code formatting process. This can work pretty well for
many sample files. But it often fails when multiple statements per line, nested comments, comments around
incomplete blocks of code or keywords, obscure language features such as escapes in quoted strings, etc.
are encountered, as they always are in large systems of software. The result of such failure is badly
formatted source text, or worse, source code that is no longer is acceptable to the compilers.
The most reliable way to build a look-and-feel source code formatter is
to parse the source language according to the source language lexical and syntax rules. This ensures that
the syntax structures found match those of the programming language.
|
SourceFormatX code formatter works this way, because it is built around the powerful
Syntax Parser Engines to parse and restructure source files. That's why the code formatting effect of
SourceFormatX source code formatter is wonderful.
Now you can check out the code formatting demo of
SourceFormatX code beautifier to know the code reformatting
ability of SourceFormatX's syntax parse engines. Action speaks louder than words.
Preview source code formatting demo »
Download free evaluation version now »
|