|
| 1 | + |
| 2 | +%%%%%%%%%% |
| 3 | +%% This Fortran grammar is structured according to document ISO/IEC 1539:1991. |
| 4 | +%% Rulenumbers are named R2xx - R12xx as in Annex D of 1539:1991 |
| 5 | +%% The grammar is adapted from an ELI project grammer, http://eli-project.cvs.sourceforge.net/eli-project |
| 6 | +%% |
| 7 | +%%%%%%%%%% |
| 8 | +%% ISO/IEC 1539:1991 section R2xx Fortran terms and concepts |
| 9 | +%%%%%%%%%% |
| 10 | + |
| 11 | +%%module languages/fortran/syntax/Fortran90 |
| 12 | +module Main |
| 13 | + |
| 14 | +%%imports languages/fortran/syntax/FortranLex |
| 15 | +%%imports languages/fortran/syntax/R400DataTypes |
| 16 | +%%imports languages/fortran/syntax/R500DataDeclarations |
| 17 | +%%imports languages/fortran/syntax/R600UseDataObjects |
| 18 | +%%imports languages/fortran/syntax/R700Expressions |
| 19 | +%%imports languages/fortran/syntax/R800ExecutionControl |
| 20 | +%%imports languages/fortran/syntax/R900IOStatements |
| 21 | +%%imports languages/fortran/syntax/R1000_IOEditing |
| 22 | +%%imports languages/fortran/syntax/R1100ProgramUnits |
| 23 | +%%imports languages/fortran/syntax/R1200Procedures |
| 24 | + |
| 25 | +imports FortranLex |
| 26 | +imports R400DataTypes |
| 27 | +imports R500DataDeclarations |
| 28 | +imports R600UseDataObjects |
| 29 | +imports R700Expressions |
| 30 | +imports R800ExecutionControl |
| 31 | +imports R900IOStatements |
| 32 | +imports R1000_IOEditing |
| 33 | +imports R1100ProgramUnits |
| 34 | +imports R1200Procedures |
| 35 | + |
| 36 | +exports |
| 37 | + |
| 38 | +context-free start-symbols |
| 39 | + Program |
| 40 | + |
| 41 | +context-free syntax |
| 42 | + |
| 43 | +%%R201 JD: the optional startcommentblock is needed to parse comment lines in 1st lines of a file. |
| 44 | +%% original: ExecutableProgram ProgramUnit -> ExecutableProgram |
| 45 | + |
| 46 | +%%R201 |
| 47 | + StartCommentBlock? ProgramUnit+ -> Program {cons("Program")} |
| 48 | + |
| 49 | +%%TODO - Figure out what Fortran.sdf really does |
0 commit comments