Patch #2045 2007-06-10 14:47

dmoore

Fortran lexer (f90, f95, f2k)
Download
2045-Fortran_lexer.patch (7.8 KB)
Category
Application::FeatureAdd
Status
Closed
Close date
2007-06-12 09:00
Assigned to
mortenmacfly
Index: src/sdk/resources/lexers/lexer_fortran.sample
===================================================================
--- src/sdk/resources/lexers/lexer_fortran.sample    (revision 0)
+++ src/sdk/resources/lexers/lexer_fortran.sample    (revision 0)
@@ -0,0 +1,44 @@
+MODULE NUMERICAL
+USE DECLARATIONS
+CONTAINS
+
+SUBROUTINE ELGS (A,N,INDX)
+! Subroutine to perform the partial-pivoting Gaussian elimination.
+! A(N,N) is the original matrix in the input and transformed matrix
+! plus the pivoting element ratios below the diagonal in the output.
+! INDX(N) records the pivoting order.  Copyright (c) Tao Pang 2001.
+  IMPLICIT NONE
+  INTEGER, INTENT (IN) :: N
+  INTEGER :: I,J,K,ITMP
+  INTEGER, INTENT (OUT), DIMENSION (N) :: INDX
+  REAL :: C1,PI,PI1,PJ
+  REAL, INTENT (INOUT), DIMENSION (N,N) :: A
+  REAL, DIMENSION (N) :: C
+! Initialize the index
+  DO I = 1, N
+    INDX(I) = I
+  END DO
+! Find the rescaling factors, one from each row
+  DO I = 1, N
+    C1= 0.0
+    DO J = 1, N
+      C1 = AMAX1(C1,ABS(A(I,J)))
+    END DO
+    C(I) = C1
+  END DO
+! Search the pivoting (largest) element from each column
+  DO J = 1, N-1
+    PI1 = 0.0
+    DO I = J, N
+      PI = ABS(A(INDX(I),J))/C(INDX(I))
+      IF (PI.GT.PI1) THEN
+        PI1 = PI
+        K   = I
+      ENDIF
+    END DO
+! Search the pivoting (largest) element from each column
+! Interchange the rows via INDX(N) to record pivoting order
+! etc ....
+  END DO
+END SUBROUTINE ELGS
+END MODULE NUMERICAL
Index: src/sdk/resources/lexers/lexer_fortran.xml
===================================================================
--- src/sdk/resources/lexers/lexer_fortran.xml    (revision 0)
+++ src/sdk/resources/lexers/lexer_fortran.xml    (revision 0)
@@ -0,0 +1,139 @@
+<?xml version="1.0"?>
+<!DOCTYPE CodeBlocks_lexer_properties>
+<CodeBlocks_lexer_properties>
+        <Lexer name="Fortran"
+                index="36"
+                filemasks="*.f90,*.f95,*.f2k">
+                <Style name="Default"
+                        index="0"
+                        fg="0,0,0"
+                        bg="255,255,255"
+                        bold="0"
+                        italics="0"
+                        underlined="0"/>
+                <Style name="Comment"
+                        index="1"
+                        fg="160,160,160"/>
+                <Style name="Number"
+                        index="2"
+                        fg="240,0,240"/>
+                <Style name="Identifier"
+                        index="7"
+                        fg="240,0,240"/>
+                <Style name="Keyword"
+                        index="8"
+                        fg="0,0,160"
+                        bold="1"/>
+                <Style name="User keyword"
+                        index="9,10"
+                        fg="0,160,0"
+                        bold="1"/>
+                <Style name="String"
+                        index="3,4,5"
+                        fg="0,0,255"/>
+                <Style name="Label"
+                        index="13"
+                        fg="0,0,255"/>
+                <Style name="Continuation"
+                        index="14"
+                        fg="0,0,255"/>
+                <Style name="Preprocessor"
+                        index="11"
+                        fg="0,160,0"/>
+                <Style name="Operator"
+                        index="6,12"
+                        fg="255,0,0"/>
+                <Style name="Selection"
+                        index="-99"
+                        bg="192,192,192"/>
+                <Style name="Active line"
+                        index="-98"
+                        bg="255,255,160"/>
+                <Style name="Breakpoint line"
+                        index="-2"
+                        bg="255,160,160"/>
+                <Style name="Debugger active line"
+                        index="-3"
+                        bg="160,160,255"/>
+                <Style name="Compiler error line"
+                        index="-4"
+                        bg="255,128,0"/>
+                <Style name="Matching brace highlight"
+                        index="34"
+                        fg="255,0,0"
+                        bold="1"
+                        underlined="1"/>
+                <Style name="No matching brace highlight"
+                        index="35"
+                        bg="255,0,0"/>
+                <Keywords>
+                        <!-- Primary keywords and input/output-->
+                        <Set index="0"
+                            value="access action advance allocatable allocate
+apostrophe assign assignment associate asynchronous backspace
+bind blank blockdata call case character class close common
+complex contains continue cycle data deallocate decimal delim
+default dimension direct do dowhile double doubleprecision else
+elseif elsewhere encoding end endassociate endblockdata enddo
+endfile endforall endfunction endi
download for full patch...
mortenmacfly 2007-06-12 09:00

Sorry, forgot to mention that it has been applied in SVN. Thanks!