wiki:FortranTranslationIssues

Version 7 (modified by wuwenhao, 7 years ago) ( diff )

--

Fortran Translation Issues

Redesign the Preprocessor

1. Preprocessor

1). Input: Raw char stream read from source files

2). Output: A pp-token stream

2. PP Token Converter

1). Input: A pp-token stream

2). Output: A CIVL-C token stream.

3). Functionality:

Based on a specific programming language (C/CIVL-C or Fortran), the convertor analyzes each pp-token and generates a corresponding !CIVLCToken for each of them.

3. Language Based Parser

1). Input: A CIVLCToken stream

2). Output: A CIVL parse tree

Meeting Notes for Fortran Front-End

01-08-2019

0). The preprocessor will only create and handle pp-tokens (preprocess tokens).

1). All language specific tokens & keywords should be created after the preprocess procedure.

2). Language grammar based converters (C/CIVL-C & Fortran) should be developed for generating CIVLC tokens from pp-tokens.

3). Different parsers will be used for pars the CIVL-C token stream

1). A detailed plan of adding, removing and changing class/grammar files

2). Preprocessor grammar: (Both Prep Lexer and Parser grammars in one file)

CIVLC Lexer grammar: (Mainly for debugging) Defines all CIVLC Tokens

PP2CIVLTokenConverter Converts a pp-token to a CIVLC token, or combine several into a single CIVLC token like ..

CIVLC Parser grammar: (Using CIVLC Token)

Fortran Parser grammar: (Using CIVLC Token)

Front End Packages and Classes

edu.udel.cis.vsl.abc.front

edu.udel.cis.vsl.abc.front.IF

Front

Preprocessor

Parser

ASTBuilder

ParseTree

edu.udel.cis.vsl.abc.front.IF.exception

ABCFrontEndException

ABCFrontEndRuntimeException

CivlcTokenConstant

edu.udel.cis.vsl.abc.front.common

edu.udel.cis.vsl.abc.front.common.preproc

CommonCharacterStream

FilteredStream

CPreprocessor

MacroExpander

CPreprocessorExpressionAnalyzer

CPreprocessorSourceFileInfo

CPreprocessorTokenSource

CPreprocessorUtils

edu.udel.cis.vsl.abc.front.c

edu.udel.cis.vsl.abc.front.c.preparse

edu.udel.cis.vsl.abc.front.c.parse

edu.udel.cis.vsl.abc.front.c.astgen

edu.udel.cis.vsl.abc.front.fortran

edu.udel.cis.vsl.abc.front.fortran.preparse

edu.udel.cis.vsl.abc.front.fortran.parse

edu.udel.cis.vsl.abc.front.fortran.astgen

Note: See TracWiki for help on using the wiki.