In article <Wc********************@bt.com"Malcolm" <re*******@btinternet.comwrites:
<pu**********@gmail.comwrote in message
news:11**********************@l12g2000cwl.googlegr oups.com...
Hi Can anyone guide me by providing me the code ,for the following
requirement:
desining parser for fortran language(parsing fortran)
There's an open-source Basic interpreter on my website which will get you
started in the language parsing game. There is also an associated book - you
have to pay for a copy, I'm afraid, but it's not expensive.
Parsing Fortran is not exactly trivial. You need a lot of look-ahead.
For instance, when you see the initial part of a line as:
REALR(5)
you do not yet know whether it is a declaration or a statement. Is it
a declaration of the array R of 5-elements of REAL's or is it an
assignment to the 5-th element of the array REALR? And as keywords are
not reserved, it is possible to have the following declaration:
REALREAL
which declares REAL as a variable of type REAL.
--
dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland;
http://www.cwi.nl/~dik/