Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[photran-dev] Fortran Is Big

For what it's worth, I finally found a lex-/yacc-able C++ lexer and parser. Although it's not particularly useful or accurate, I can finally give some numbers...

C
   Lex Spec: 175 lines
   Grammar: 472 lines

C++
   Lex Spec: 167 lines
   Grammar: 1054 lines

Fortran 95
   Lexers (total): 383+438+77+439+1499=2836 lines
   Grammar: 2477 lines

So there you go... in terms of syntax, Fortran is roughly five times as large as C and twice as large as C++, and lexing Fortran is a @&#*$ (but we already knew that).

Jeff


Back to the top