473,402 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

parsing fortran

Hi Can anyone guide me by providing me the code ,for the following
requirement:
desining parser for fortran language(parsing fortran)

Nov 24 '06 #1
12 2641

pu**********@gmail.com wrote:
Hi Can anyone guide me by providing me the code ,for the following
requirement:
desining parser for fortran language(parsing fortran)
Sorry, but No.

Just as no one at a Ford dealership can provide you with the repair
manuals for your Subaru SUV, fortran is completely off-topic in
comp.lang.c

In addition to that, we don't do other peoples homework for them, and
we aren't a source-code supply shop.

Sorry

--
Lew

Nov 24 '06 #2
pu**********@gmail.com wrote:
Hi Can anyone guide me by providing me the code ,for the following
requirement:
desining parser for fortran language(parsing fortran)
How many thousands of Euros will you pay me for this?

Richard
Nov 24 '06 #3
pu**********@gmail.com wrote:
Hi Can anyone guide me by providing me the code ,for the following
requirement:
desining parser for fortran language(parsing fortran)
The source code of g95 is at http://ftp.g95.org/g95_source.tgz , and
that of gfortran (part of gcc) is at
http://quatramaran.ens.fr/~coudert/g...cc-svn.tar.bz2 . Both g95
and gfortran are Fortran 95 compilers written in C. I suggest
continuing this thread in comp.lang.fortran if necessary.

Nov 24 '06 #4

<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.
--
www.personal.leeds.ac.uk/~bgy1mm
freeware games to download.
Nov 25 '06 #5
pu**********@gmail.com wrote:
Hi Can anyone guide me by providing me the code ,for the following
requirement:
desining parser for fortran language(parsing fortran)
Ask in comp.lang.fortran or comp.compilers.

Nov 25 '06 #6
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/
Nov 26 '06 #7

"Dik T. Winter" <Di********@cwi.nlwrote in message
news:J9********@cwi.nl...
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.
It's a lot harder to parse someone else's language specification than to
make up your own as you go along, which was partly why MiniBasic is my own
flavour of BASIC - very recognisable, but with a few quirks.
--
www.personal.leeds.ac.uk/~bgy1mm
freeware games to download.

Nov 26 '06 #8
On Nov 25, 7:33 am, "santosh" <santosh....@gmail.comwrote:
purushota...@gmail.com wrote:
Hi Can anyone guide me by providing me the code ,for the following
requirement:
desining parser for fortran language(parsing fortran)Ask in comp.lang.fortran or comp.compilers.
Alternatively, you could investigate "The classification of FORTRAN
statements" by Arthur Sale, available at
http://eprints.utas.edu.au/122/. I have implemented this algorithm
(actually the modified version as described in "A Modification of
Sale's Algorithm to Accommodate FORTRAN 77" by J. K. Slape and Peter J.
L. Wallis) and I don't mind sharing it with you if you can convince me
this is not homework. What exactly are you trying to do?

Nov 26 '06 #9
jburgy wrote:
On Nov 25, 7:33 am, "santosh" <santosh....@gmail.comwrote:
purushota...@gmail.com wrote:
Hi Can anyone guide me by providing me the code ,for the following
requirement:
desining parser for fortran language(parsing fortran)Ask in comp.lang.fortran or comp.compilers.

Alternatively, you could investigate "The classification of FORTRAN
statements" by Arthur Sale, available at
http://eprints.utas.edu.au/122/. I have implemented this algorithm
(actually the modified version as described in "A Modification of
Sale's Algorithm to Accommodate FORTRAN 77" by J. K. Slape and Peter J.
L. Wallis) and I don't mind sharing it with you if you can convince me
this is not homework. What exactly are you trying to do?
Why don't you address the OP?

Nov 26 '06 #10

<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 is a Fortran parser in GCC but that probably does not answer your
question. Which version of Fortran. If its "old" Fortran 77 then its tricky
as spaces are ignored most places except strings. There are no reserved
words so for example this is legal Fortran 77...

r e a l r e a l
real read(6),format(2)
format(1)=6
write(6,1)format(1)
1 f o r m a t ('1', F6.1)
s t o p
e n d


Nov 27 '06 #11
"David Wade" <g8***@yahoo.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 is a Fortran parser in GCC but that probably does not answer your
question. Which version of Fortran. If its "old" Fortran 77 then its tricky
as spaces are ignored most places except strings. There are no reserved
words so for example this is legal Fortran 77...

r e a l r e a l
real read(6),format(2)
format(1)=6
write(6,1)format(1)
1 f o r m a t ('1', F6.1)
s t o p
e n d
My favourite: setting the variable called DO10I = 1.5 is only
detectably not a loop (DO 10 I = 1,5) at the ".". We have come a long
way.

--
Ben.
Nov 27 '06 #12
On Mon, 27 Nov 2006 00:48:21 -0000, "David Wade" <g8***@yahoo.com>
wrote:
>
<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 is a Fortran parser in GCC but that probably does not answer your
question. Which version of Fortran. If its "old" Fortran 77 then its tricky
as spaces are ignored most places except strings. There are no reserved
words so for example this is legal Fortran 77... <snip example>
And in F90/95 and F03 the old 'fixed-form' is still provided, although
there is now the _option_ of 'free-form' that has normal lexing but
still has unreserved keywords, which are at least as bad for parsing
as C typedefs (and C++ classnames etc.).

- David.Thompson1 at worldnet.att.net
Dec 18 '06 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

44
by: Carl | last post by:
"Nine Language Performance Round-up: Benchmarking Math & File I/O" http://www.osnews.com/story.php?news_id=5602 I think this is an unfair comparison! I wouldn't dream of developing a numerical...
14
by: Viktor Rosenfeld | last post by:
Hi, I need to create a parser for a Python project, and I'd like to use process kinda like lex/yacc. I've looked at various parsing packages online, but didn't find anything useful for me: -...
15
by: Nick Coghlan | last post by:
Thought some folks here might find this one interesting. No great revelations, just a fairly sensible piece on writing readable code :) The whole article:...
1
by: Sam | last post by:
Hello all I have a two dimensional array (the dimensions are not known) that needs to be passed to fortran from c++, allocate the dimensions of the array in fortran code, do some filling up of...
2
by: NM | last post by:
Hello all, I am supposed to do some mixed programming with c++ and fortran. I was succeeful in exchanging the 2D arrays from fortran to c++ and the other way, but was unable to that same with...
81
by: Matt | last post by:
I have 2 questions: 1. strlen returns an unsigned (size_t) quantity. Why is an unsigned value more approprate than a signed value? Why is unsighned value less appropriate? 2. Would there...
5
by: gamehack | last post by:
Hi all, I was thinking about parsing equations but I can't think of any generic approach. Basically I have a struct called math_term which is something like: struct math_term { char sign; int...
2
by: luis | last post by:
I'm using ctypes to call a fortran dll from python. I have no problems passing integer and double arryas, but I have an error with str arrys. For example: ..... StringVector = c_char_p *...
13
by: Chris Carlen | last post by:
Hi: Having completed enough serial driver code for a TMS320F2812 microcontroller to talk to a terminal, I am now trying different approaches to command interpretation. I have a very simple...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.