kataoka@ai.cs.Fujitsu.Co.JP (Michiaki Kataoka) (10/20/90)
Hello! I'm very interested in fortran lexical analysis. Following example is legal fortran source program. *-------------------------------- DO 3 = 1.0 THEN THEN = 1.0 CALL 12 = DO 3 + THEN THEN WRITE(6,*) ' ANSWER: CALL12 = ', CALL12, ' DO3 = ', DO3 WRITE(6,*) ' THENTHEN = ' , THENTHEN END *--------------------------------------------- Would you recommand any books or reports about fortran lexical analysis? Michiaki Kataoka kataoka@ai.cs.fujitsu.co.jp
kataoka@ai.cs.Fujitsu.Co.JP (Michiaki Kataoka) (10/22/90)
In article <KATAOKA.90Oct20214123@Virgo.ai.cs.Fujitsu.Co.JP> kataoka@ai.cs.Fujitsu.Co.JP (Michiaki Kataoka) writes: >Following example is legal fortran source program. >*-------------------------------- > DO 3 = 1.0 > THEN THEN = 1.0 > CALL 12 = DO 3 + THEN THEN > WRITE(6,*) ' ANSWER: CALL12 = ', CALL12, ' DO3 = ', DO3 > WRITE(6,*) ' THENTHEN = ' , THENTHEN > END >*--------------------------------------------- It is not. A few people sent me letters correcting my error. "Standard" fortran syntax prohibits over 6 character identifier. Thanks. Michiaki Kataoka kataoka@ai.cs.fujitsu.co.jp
chidsey@smoke.BRL.MIL (Irving Chidsey) (10/23/90)
In article <KATAOKA.90Oct23003247@Leo.ai.cs.Fujitsu.Co.JP> kataoka@ai.cs.Fujitsu.Co.JP (Michiaki Kataoka) writes: <In article <KATAOKA.90Oct20214123@Virgo.ai.cs.Fujitsu.Co.JP> < kataoka@ai.cs.Fujitsu.Co.JP (Michiaki Kataoka) writes: < >Following example is legal fortran source program. < >*-------------------------------- < > DO 3 = 1.0 < > THEN THEN = 1.0 < > CALL 12 = DO 3 + THEN THEN < > WRITE(6,*) ' ANSWER: CALL12 = ', CALL12, ' DO3 = ', DO3 < > WRITE(6,*) ' THENTHEN = ' , THENTHEN < > END < >*--------------------------------------------- < < It is not. A few people sent me letters correcting my error. < "Standard" fortran syntax prohibits over 6 character identifier. < Thanks. < <Michiaki Kataoka <kataoka@ai.cs.fujitsu.co.jp But if you substitute 'if if' for 'then then' it should pass. Irv -- I do not have signature authority. I am not authorized to sign anything. I am not authorized to commit the BRL, the DOA, the DOD, or the US Government to anything, not even by implication. Irving L. Chidsey <chidsey@brl.mil>