Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
64 lines (51 sloc) 2.22 KB
%%%%%%%%%%
%% This Fortran grammar is structured according to document ISO/IEC 1539:1991.
%% Rulenumbers are named R2xx - R12xx as in Annex D of 1539:1991
%% The grammar is adapted from an ELI project grammer, http://eli-project.cvs.sourceforge.net/eli-project
%%
%%%%%%%%%%
%% ISO/IEC 1539:1991 section R2xx Fortran terms and concepts
%%%%%%%%%%
%%module languages/fortran/syntax/Fortran90
module Fortran
%%imports languages/fortran/syntax/FortranLex
%%imports languages/fortran/syntax/R400DataTypes
%%imports languages/fortran/syntax/R500DataDeclarations
%%imports languages/fortran/syntax/R600UseDataObjects
%%imports languages/fortran/syntax/R700Expressions
%%imports languages/fortran/syntax/R800ExecutionControl
%%imports languages/fortran/syntax/R900IOStatements
%%imports languages/fortran/syntax/R1000_IOEditing
%%imports languages/fortran/syntax/R1100ProgramUnits
%%imports languages/fortran/syntax/R1200Procedures
imports FortranLex
%%TODO imports R400DataTypes
imports R500DataDeclarations
%%TODO imports R600UseDataObjects
%%TODO imports R700Expressions
%%TODO imports R800ExecutionControl
imports R900IOStatements
imports R1000_IOEditing
imports R1100ProgramUnits
%%TODO imports R1200Procedures
exports
sorts
ActionStmt ArrayName Body
%%TODO BodyConstruct CommonBlockName ComponentName DeclarationConstruct DefinedOperator
%%TODO DummyArgName EndName EntryName ExecutableConstruct ExecutableProgram
ExecutionPartConstruct %%TODO ExternalName FunctionName GenericName ImpliedDoVariable
%%TODO InternalSubProgPart InternalSubprogram IntrinsicProcedureName MainProgram
%%TODO MainRange ModuleSubprogram ModuleSubprogramPartConstruct Name
%%TODO NamelistGroupName ObjectName ProgramName ProgramUnit SFDummyArgName
%%TODO SpecificationPartConstruct SpecificationStmt SubroutineName SubroutineNameUse TypeName
%%TODO VariableName
%%TODO - replace with above
DefinedOperator
ExecutableConstruct
context-free start-symbols
Program
context-free syntax
%%R201 JD: the optional startcommentblock is needed to parse comment lines in 1st lines of a file.
%% original: ExecutableProgram ProgramUnit -> ExecutableProgram
StartCommentBlock? ProgramUnit+ -> Program
%%TODO - Figure out what Fortran.sdf really does