qscilexerfortran.cpp 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. // This module implements the QsciLexerFortran class.
  2. //
  3. // Copyright (c) 2017 Riverbank Computing Limited <info@riverbankcomputing.com>
  4. //
  5. // This file is part of QScintilla.
  6. //
  7. // This file may be used under the terms of the GNU General Public License
  8. // version 3.0 as published by the Free Software Foundation and appearing in
  9. // the file LICENSE included in the packaging of this file. Please review the
  10. // following information to ensure the GNU General Public License version 3.0
  11. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  12. //
  13. // If you do not wish to use this file under the terms of the GPL version 3.0
  14. // then you may purchase a commercial license. For more information contact
  15. // info@riverbankcomputing.com.
  16. //
  17. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  18. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  19. #include "Qsci/qscilexerfortran.h"
  20. #include <qcolor.h>
  21. #include <qfont.h>
  22. #include <qsettings.h>
  23. // The ctor.
  24. QsciLexerFortran::QsciLexerFortran(QObject *parent)
  25. : QsciLexerFortran77(parent)
  26. {
  27. }
  28. // The dtor.
  29. QsciLexerFortran::~QsciLexerFortran()
  30. {
  31. }
  32. // Returns the language name.
  33. const char *QsciLexerFortran::language() const
  34. {
  35. return "Fortran";
  36. }
  37. // Returns the lexer name.
  38. const char *QsciLexerFortran::lexer() const
  39. {
  40. return "fortran";
  41. }
  42. // Returns the set of keywords.
  43. const char *QsciLexerFortran::keywords(int set) const
  44. {
  45. if (set == 2)
  46. return
  47. "abs achar acos acosd adjustl adjustr aimag aimax0 aimin0 aint "
  48. "ajmax0 ajmin0 akmax0 akmin0 all allocated alog alog10 amax0 "
  49. "amax1 amin0 amin1 amod anint any asin asind associated atan "
  50. "atan2 atan2d atand bitest bitl bitlr bitrl bjtest bit_size "
  51. "bktest break btest cabs ccos cdabs cdcos cdexp cdlog cdsin "
  52. "cdsqrt ceiling cexp char clog cmplx conjg cos cosd cosh count "
  53. "cpu_time cshift csin csqrt dabs dacos dacosd dasin dasind datan "
  54. "datan2 datan2d datand date date_and_time dble dcmplx dconjg dcos "
  55. "dcosd dcosh dcotan ddim dexp dfloat dflotk dfloti dflotj digits "
  56. "dim dimag dint dlog dlog10 dmax1 dmin1 dmod dnint dot_product "
  57. "dprod dreal dsign dsin dsind dsinh dsqrt dtan dtand dtanh "
  58. "eoshift epsilon errsns exp exponent float floati floatj floatk "
  59. "floor fraction free huge iabs iachar iand ibclr ibits ibset "
  60. "ichar idate idim idint idnint ieor ifix iiabs iiand iibclr "
  61. "iibits iibset iidim iidint iidnnt iieor iifix iint iior iiqint "
  62. "iiqnnt iishft iishftc iisign ilen imax0 imax1 imin0 imin1 imod "
  63. "index inint inot int int1 int2 int4 int8 iqint iqnint ior ishft "
  64. "ishftc isign isnan izext jiand jibclr jibits jibset jidim jidint "
  65. "jidnnt jieor jifix jint jior jiqint jiqnnt jishft jishftc jisign "
  66. "jmax0 jmax1 jmin0 jmin1 jmod jnint jnot jzext kiabs kiand kibclr "
  67. "kibits kibset kidim kidint kidnnt kieor kifix kind kint kior "
  68. "kishft kishftc kisign kmax0 kmax1 kmin0 kmin1 kmod knint knot "
  69. "kzext lbound leadz len len_trim lenlge lge lgt lle llt log log10 "
  70. "logical lshift malloc matmul max max0 max1 maxexponent maxloc "
  71. "maxval merge min min0 min1 minexponent minloc minval mod modulo "
  72. "mvbits nearest nint not nworkers number_of_processors pack "
  73. "popcnt poppar precision present product radix random "
  74. "random_number random_seed range real repeat reshape rrspacing "
  75. "rshift scale scan secnds selected_int_kind selected_real_kind "
  76. "set_exponent shape sign sin sind sinh size sizeof sngl snglq "
  77. "spacing spread sqrt sum system_clock tan tand tanh tiny transfer "
  78. "transpose trim ubound unpack verify";
  79. if (set == 3)
  80. return
  81. "cdabs cdcos cdexp cdlog cdsin cdsqrt cotan cotand dcmplx dconjg "
  82. "dcotan dcotand decode dimag dll_export dll_import doublecomplex "
  83. "dreal dvchk encode find flen flush getarg getcharqq getcl getdat "
  84. "getenv gettim hfix ibchng identifier imag int1 int2 int4 intc "
  85. "intrup invalop iostat_msg isha ishc ishl jfix lacfar locking "
  86. "locnear map nargs nbreak ndperr ndpexc offset ovefl peekcharqq "
  87. "precfill prompt qabs qacos qacosd qasin qasind qatan qatand "
  88. "qatan2 qcmplx qconjg qcos qcosd qcosh qdim qexp qext qextd "
  89. "qfloat qimag qlog qlog10 qmax1 qmin1 qmod qreal qsign qsin qsind "
  90. "qsinh qsqrt qtan qtand qtanh ran rand randu rewrite segment "
  91. "setdat settim system timer undfl unlock union val virtual "
  92. "volatile zabs zcos zexp zlog zsin zsqrt";
  93. return QsciLexerFortran77::keywords(set);
  94. }