Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
This commit is contained in:
commit
c27dc2cea3
1 changed files with 37 additions and 31 deletions
68
vendor/plugins/syntax/lib/syntax/lang/fortran.rb
vendored
68
vendor/plugins/syntax/lib/syntax/lang/fortran.rb
vendored
|
@ -1,6 +1,6 @@
|
||||||
# fortran.rb -- a free-form Fortran module for the Ruby Syntax library
|
# fortran.rb -- a free-form Fortran module for the Ruby Syntax library
|
||||||
#
|
#
|
||||||
# Copyright (C) 2009 Jason Blevins
|
# Copyright (C) 2009-2010 Jason Blevins
|
||||||
# License: 3-clause BSD (the same as Syntax itself)
|
# License: 3-clause BSD (the same as Syntax itself)
|
||||||
|
|
||||||
require 'syntax'
|
require 'syntax'
|
||||||
|
@ -12,66 +12,72 @@ class Fortran < Tokenizer
|
||||||
|
|
||||||
# Fortran keywords
|
# Fortran keywords
|
||||||
LC_KEYWORDS =
|
LC_KEYWORDS =
|
||||||
%w{ access assign backspace blank block call close common
|
%w{ assign backspace call close common continue data dimension do
|
||||||
continue data dimension direct do else endif enddo end entry eof
|
else end endfile endif enddo entry equivalence external
|
||||||
equivalence err exist external file fmt form format formatted
|
format function goto if implicit inquire intrinsic open
|
||||||
function go to if implicit include inquire intrinsic iostat
|
parameter pause print program read return rewind
|
||||||
logical named namelist nextrec number open opened parameter pause
|
save stop subroutine then write } +
|
||||||
print program read rec recl return rewind sequential status stop
|
[ "block data", "go to" ] +
|
||||||
subroutine then type unformatted unit write save } +
|
|
||||||
# Fortran 90 keywords
|
# Fortran 90 keywords
|
||||||
%w{ allocate allocatable case contains cycle deallocate
|
%w{ allocate allocatable case contains cycle deallocate
|
||||||
elsewhere exit interface intent module only operator
|
elsewhere exit include interface intent module namelist nullify
|
||||||
optional pointer private procedure public result recursive
|
only operator optional pointer private procedure public
|
||||||
select sequence target use while where } +
|
result recursive select sequence target type use while where } +
|
||||||
# Fortran 95 keywords
|
# Fortran 95 keywords
|
||||||
%w{ elemental forall pure } +
|
%w{ elemental forall pure } +
|
||||||
# Fortran 2003 keywords
|
# Fortran 2003 keywords
|
||||||
%w{ abstract asynchronous bind class delegate static reference
|
%w{ abstract associate asynchronous bind class deferred enum enumerator
|
||||||
round decimal sign encoding iomsg endfile nextrec pending
|
extends final flush generic import non_overridable nopass pass
|
||||||
pass protected associate flush decorate extends extensible
|
protected value volatile wait } +
|
||||||
generic non_overridable enum enumerator typealias move_alloc
|
# Fortran 2008 keywords
|
||||||
volatile }
|
%w{ block codimension concurrent contiguous critical submodule
|
||||||
|
lock unlock } +
|
||||||
|
[ "error stop", "sync all", "sync images", "sync memory" ]
|
||||||
|
|
||||||
# List of identifiers recognized as types
|
# List of identifiers recognized as types
|
||||||
LC_TYPES =
|
LC_TYPES = [ "character", "complex", "logical", "integer", "real",
|
||||||
%w{ character double integer real precision complex }
|
"double precision" ]
|
||||||
|
|
||||||
# Fortran intrinsic procedures
|
# Fortran intrinsic procedures
|
||||||
LC_INTRINSICS = %w{
|
LC_INTRINSICS = %w{
|
||||||
abs achar acos acosh adjustl adjustr aimag
|
abs achar acos acosh adjustl adjustr aimag
|
||||||
aint all allocated anint any asin asinh
|
aint all allocated anint any asin asinh
|
||||||
associated atan atan2 atanh
|
associated atan atan2 atanh atomic_define atomic_ref
|
||||||
bessel_j0 bessel_j1 bessel_jn
|
bessel_j0 bessel_j1 bessel_jn
|
||||||
bessel_y0 bessel_y1 bessel_yn
|
bessel_y0 bessel_y1 bessel_yn
|
||||||
bit_size btest
|
bit_size btest
|
||||||
|
bge bgt ble blt
|
||||||
c_associated c_f_pointer c_f_procpointer
|
c_associated c_f_pointer c_f_procpointer
|
||||||
c_funloc c_loc c_sizeof
|
c_funloc c_loc c_sizeof
|
||||||
ceiling char cmplx command_argument_count
|
ceiling char cmplx command_argument_count
|
||||||
|
compiler_version compiler_options
|
||||||
conjg cos cosh count cpu_time cshift
|
conjg cos cosh count cpu_time cshift
|
||||||
date_and_time dble digits dim dot_product dprod
|
date_and_time dble digits dim dot_product dprod
|
||||||
|
dshiftl dshiftr
|
||||||
eoshift epsilon erf erfc erfc_scaled exp exponent
|
eoshift epsilon erf erfc erfc_scaled exp exponent
|
||||||
float floor fraction
|
execute_command_line extends_type_of
|
||||||
|
findloc float floor fraction
|
||||||
gamma get_command get_command_argument
|
gamma get_command get_command_argument
|
||||||
get_environment_variable
|
get_environment_variable
|
||||||
huge hypot
|
huge hypot
|
||||||
iachar iand ibclr ibits ibset ichar int ior
|
iachar iall iand iany ibclr ibits ibset ichar image_index
|
||||||
is_iostat_end is_iostat_eor ishft ishftc
|
int ior iparity is_contiguous is_iostat_end is_iostat_eor
|
||||||
|
ishft ishftc
|
||||||
kind
|
kind
|
||||||
lbound leadz len len_trim lge lgt lle llt
|
lbound lcobound leadz len len_trim lge lgt lle llt
|
||||||
log log10 log_gamma logical
|
log log10 log_gamma logical
|
||||||
matmul max maxexponent maxloc maxval merge
|
maskl maskr matmul max maxexponent maxloc maxval merge merge_bits
|
||||||
min minexponent minloc minval mod modulo
|
min minexponent minloc minval mod modulo
|
||||||
move_alloc mvbits
|
move_alloc mvbits
|
||||||
nearest new_line nint not null
|
nearest new_line nint norm2 not null num_images
|
||||||
pack precision present product
|
pack parity popcnt poppar precision present product
|
||||||
radix random_number random_seed range real
|
radix random_number random_seed range real
|
||||||
repeat reshape rrspacing
|
repeat reshape rrspacing
|
||||||
scale scan selected_char_kind selected_int_kind
|
same_type_as scale scan selected_char_kind selected_int_kind
|
||||||
selected_real_kind set_exponent shape sign
|
selected_real_kind set_exponent shape shiftl shiftr sign
|
||||||
sin sinh size sngl spacing spread sqrt sum system_clock
|
sin sinh size sngl spacing spread sqrt storage_size sum system_clock
|
||||||
tan tanh tiny trailz transfer transpose trim
|
tan tanh this_image tiny trailz transfer transpose trim
|
||||||
ubound unpack
|
ubound ucobound unpack
|
||||||
verify
|
verify
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue