FORTRAN Parser (Front End)

The FORTRAN parser (front end) enables the construction of FORTRAN custom compilers, analysis tools, or source transformation tools. It is a member of SD's family of language front ends, based on first-class infrastructure (DMS) for implementing such custom tools. The FORTRAN front end includes:

  • Lexical analysis including ASCII and ISO 8859-1
    • Conversion of literal values (numbers, escaped strings) into native values to enable easy computation over literal values
    • String literals represented internally in UNICODE to support 16-bit characters
  • Explicit grammar directly implements Fortran 95 standard
    • Full FORTRAN parser
    • Dialect for Fortran 90
    • Dialect for Fortran 77
    • Support for other miscellaneous variations such as Cray pointers
  • C Preprocessor handling.
    • #include, #define, #if, macro invocations
    • Allows conditionals around statements, blocks and in many lists
    • Handles interactions of conditionals with fixed and free format style line continuations
  • Automatic construction of complete abstract syntax tree
    • Capture of comments and formats (shape) of literal values
    • Captures DO loops as properly nested structures, including DOs with shared termination
    • Capture of ambiguous parses during parsing
    • Captures C preprocessor usage
    • Ability to parse large systems of files into same workspace, enabling interprocedural and cross-file analysis/transformation
    • Ability to parse different languages into same workspace, enabling cross-language analysis/transformation
  • Facilities to process syntax trees
    • Complete procedural API to visit/query/update/construct/print syntax trees
    • Source regeneration by prettyprinting and/or fidelity printing of syntax trees with comments and lexical formats
    • Automatically generated source-to-source transformation system
    • Ability to define custom attribute-grammar-based analyzers
  • Available as source code to enable complete customization
    • Means to manage multiple language dialects with highly shared common core
  • Robustness due to careful testing and application across many customers

Many of these facilities come as a consistent consequence of the front end being built to top of DMS.

Your organization may use DMS with the FORTRAN front end to implement and deploy your own custom tools. Semantic Designs is also willing to build custom tools under contract.

For more information: Info@semanticdesigns.com    Follow us at Twitter: @SemanticDesigns

FORTRAN Parser
Front End