diff --git a/autotests/folding/highlight.f.fold b/autotests/folding/highlight.f.fold --- a/autotests/folding/highlight.f.fold +++ b/autotests/folding/highlight.f.fold @@ -12,17 +12,20 @@ * Prints the values of e ** (j * i * pi / 4) for i = 0, 1, 2, ..., 7 * where j is the imaginary number sqrt(-1) -PROGRAM CMPLXD - IMPLICIT COMPLEX(X) - PARAMETER (PI = 3.141592653589793, XJ = (0, 1)) - DO 1, I = 0, 7 - X = EXP(XJ * I * PI / 4) - IF (AIMAG(X).LT.0) THEN - PRINT 2, 'e**(j*', I, '*pi/4) = ', REAL(X), ' - j',-AIMAG(X) - ELSE - PRINT 2, 'e**(j*', I, '*pi/4) = ', REAL(X), ' + j', AIMAG(X) - END IF - FORMAT (A, I1, A, F10.7, A, F9.7) - CONTINUE - STOP -END + PROGRAM CMPLXD + IMPLICIT COMPLEX(X) + PARAMETER (PI = 3.141592653589793, XJ = (0, 1)) this text should be highlighted as a comment because it is after the 72th column (ignored by the compiler) + DO 1, I = 0, 7 + X = EXP(XJ * I * PI / 4) + IF (AIMAG(X).LT.0) THEN + PRINT 2, 'e**(j*', I, '*pi/4) = ', ! I am an in-line comment + * REAL(X), ' - j',-AIMAG(X) ! the character at the 6th column indicate a continuation line and should be highlighted as a continuation character + ELSE + PRINT 2, 'e**(j*', I, '*pi/4) = ', + * REAL(X), ' + j', AIMAG(X) + END IF + FORMAT (A, I1, A, F10.7, A, F9.7) + CONTINUE + ENDDO + STOP + END diff --git a/autotests/html/highlight.f.html b/autotests/html/highlight.f.html --- a/autotests/html/highlight.f.html +++ b/autotests/html/highlight.f.html @@ -18,18 +18,21 @@ * Prints the values of e ** (j * i * pi / 4) for i = 0, 1, 2, ..., 7 * where j is the imaginary number sqrt(-1) -PROGRAM CMPLXD - IMPLICIT COMPLEX(X) - PARAMETER (PI = 3.141592653589793, XJ = (0, 1)) - DO 1, I = 0, 7 - X = EXP(XJ * I * PI / 4) - IF (AIMAG(X).LT.0) THEN - PRINT 2, 'e**(j*', I, '*pi/4) = ', REAL(X), ' - j',-AIMAG(X) - ELSE - PRINT 2, 'e**(j*', I, '*pi/4) = ', REAL(X), ' + j', AIMAG(X) - END IF - FORMAT (A, I1, A, F10.7, A, F9.7) - CONTINUE - STOP -END + PROGRAM CMPLXD + IMPLICIT COMPLEX(X) + PARAMETER (PI = 3.141592653589793, XJ = (0, 1)) this text should be highlighted as a comment because it is after the 72th column (ignored by the compiler) + DO 1, I = 0, 7 + X = EXP(XJ * I * PI / 4) + IF (AIMAG(X).LT.0) THEN + PRINT 2, 'e**(j*', I, '*pi/4) = ', ! I am an in-line comment + * REAL(X), ' - j',-AIMAG(X) ! the character at the 6th column indicate a continuation line and should be highlighted as a continuation character + ELSE + PRINT 2, 'e**(j*', I, '*pi/4) = ', + * REAL(X), ' + j', AIMAG(X) + END IF + FORMAT (A, I1, A, F10.7, A, F9.7) + CONTINUE + ENDDO + STOP + END diff --git a/autotests/input/highlight.f b/autotests/input/highlight.f --- a/autotests/input/highlight.f +++ b/autotests/input/highlight.f @@ -12,17 +12,20 @@ * Prints the values of e ** (j * i * pi / 4) for i = 0, 1, 2, ..., 7 * where j is the imaginary number sqrt(-1) -PROGRAM CMPLXD - IMPLICIT COMPLEX(X) - PARAMETER (PI = 3.141592653589793, XJ = (0, 1)) - DO 1, I = 0, 7 - X = EXP(XJ * I * PI / 4) - IF (AIMAG(X).LT.0) THEN - PRINT 2, 'e**(j*', I, '*pi/4) = ', REAL(X), ' - j',-AIMAG(X) - ELSE - PRINT 2, 'e**(j*', I, '*pi/4) = ', REAL(X), ' + j', AIMAG(X) - END IF - FORMAT (A, I1, A, F10.7, A, F9.7) - CONTINUE - STOP -END + PROGRAM CMPLXD + IMPLICIT COMPLEX(X) + PARAMETER (PI = 3.141592653589793, XJ = (0, 1)) this text should be highlighted as a comment because it is after the 72th column (ignored by the compiler) + DO 1, I = 0, 7 + X = EXP(XJ * I * PI / 4) + IF (AIMAG(X).LT.0) THEN + PRINT 2, 'e**(j*', I, '*pi/4) = ', ! I am an in-line comment + * REAL(X), ' - j',-AIMAG(X) ! the character at the 6th column indicate a continuation line and should be highlighted as a continuation character + ELSE + PRINT 2, 'e**(j*', I, '*pi/4) = ', + * REAL(X), ' + j', AIMAG(X) + END IF + FORMAT (A, I1, A, F10.7, A, F9.7) + CONTINUE + ENDDO + STOP + END diff --git a/autotests/reference/highlight.f.ref b/autotests/reference/highlight.f.ref --- a/autotests/reference/highlight.f.ref +++ b/autotests/reference/highlight.f.ref @@ -12,17 +12,20 @@ * Prints the values of e ** (j * i * pi / 4) for i = 0, 1, 2, ..., 7
* where j is the imaginary number sqrt(-1)

-PROGRAM CMPLXD
- IMPLICIT COMPLEX(X)
- PARAMETER (PI = 3.141592653589793, XJ = (0, 1))
- DO 1, I = 0, 7
- X = EXP(XJ * I * PI / 4)
- IF (AIMAG(X).LT.0) THEN
- PRINT 2, 'e**(j*', I, '*pi/4) = ', REAL(X), ' - j',-AIMAG(X)
- ELSE
- PRINT 2, 'e**(j*', I, '*pi/4) = ', REAL(X), ' + j', AIMAG(X)
- END IF
- FORMAT (A, I1, A, F10.7, A, F9.7)
- CONTINUE
- STOP
-END
+ PROGRAM CMPLXD
+ IMPLICIT COMPLEX(X)
+ PARAMETER (PI = 3.141592653589793, XJ = (0, 1)) this text should be highlighted as a comment because it is after the 72th column (ignored by the compiler)
+ DO 1, I = 0, 7
+ X = EXP(XJ * I * PI / 4)
+ IF (AIMAG(X).LT.0) THEN
+ PRINT 2, 'e**(j*', I, '*pi/4) = ', ! I am an in-line comment
+ * REAL(X), ' - j',-AIMAG(X) ! the character at the 6th column indicate a continuation line and should be highlighted as a continuation character
+ ELSE
+ PRINT 2, 'e**(j*', I, '*pi/4) = ',
+ * REAL(X), ' + j', AIMAG(X)
+ END IF
+ FORMAT (A, I1, A, F10.7, A, F9.7)
+ CONTINUE
+ ENDDO
+ STOP
+ END
diff --git a/data/syntax/fortran-fixed.xml b/data/syntax/fortran-fixed.xml --- a/data/syntax/fortran-fixed.xml +++ b/data/syntax/fortran-fixed.xml @@ -1,6 +1,6 @@ - + @@ -365,14 +365,15 @@ + + - - + @@ -406,6 +407,8 @@ + + @@ -422,6 +425,11 @@ + + + + + @@ -547,6 +555,7 @@ + @@ -567,6 +576,7 @@ +