*.nas
#
[_a-zA-Z][_a-zA-Z0-9]*
[1-9][0-9]*
(?<![0-9a-zA-Z])(0x[0-9a-fA-F]+|([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?)
and
or
var
return
break(\s+[_a-zA-Z]\w*)?
continue(\s+[_a-zA-Z]\w*)?
while
for
foreach
forindex
if
elsif
else
func
(?<![\w\.])
nil
math\.e
math\.pi
D2R
R2D
FT2M
M2FT
IN2M
M2IN
NM2M
M2NM
KT2MPS
MPS2KT
LB2KG
KG2LB
GAL2L
L2GAL
FG_ROOT
FG_HOME
MODEL_PATH
[-~+*/!=?<>]
% # leading % sign
[#0\-\ \+]* # conversion flags
(\-?\%{number})? # minimum field width
(\.(\-?\%{number}))? # precision
[%sdicouxXeEfFgG] # conversion type
\\( # leading backslash
[\\"abfnrtv] | # single escaped char
N\{[A-Z\ ]+\} | # named unicode character
u[0-9A-Fa-f]{4} | # xxxx - character with 16-bit hex value xxxx
U[0-9A-Fa-f]{8} | # xxxxxxxx - character with 32-bit hex value xxxxxxxx
x[0-9A-Fa-f]{1,2} | # \xhh - character with hex value hh
[0-7]{1,3} # \ooo - character with octal value ooo
)
\\\\( # double leading backslash
\\" | # escaped quote (needs an extra backslash)
[\\abfnrtv] | # single escaped char
N\{[A-Z\ ]+\} | # named unicode character
u[0-9A-Fa-f]{4} | # xxxx - character with 16-bit hex value xxxx
U[0-9A-Fa-f]{8} | # xxxxxxxx - character with 32-bit hex value xxxxxxxx
x[0-9A-Fa-f]{1,2} | # \xhh - character with hex value hh
[0-7]{1,3} # \ooo - character with octal value ooo
)
(?<=['"])
(?=['"])
func
code
hash
scalar
vector
nil
ghost
iofile
cairo
cairo_surface
GObject
regex
sqlite_db
sqlite_statement
dir
prop
positioned
airport
aircraft
helipad
( # optional first (root) node
[a-zA-Z] # first character has to be an alpha
[-a-zA-Z0-9_]* # now it can be alpha, hyphen, or number, repeat this
(?:\[ # optional index specifier like this: [90]
(?:[0-9]+)
\])?
)?
/ # require a slash
( # middle node(s)
[a-zA-Z] # first character has to be an alpha
[-a-zA-Z0-9_]* # now it can be alpha, hyphen, or number, repeat this
(?:\[ # optional index specifier like this: [90]
(?:[0-9]+)
\])?
/ # slash to separate nodes
)* # repeat or none
( # last element, doesn't require a slash at the end
[a-zA-Z] # first character has to be an alpha
[-a-zA-Z0-9_]* # now it can be alpha, hyphen, or number, repeat this
(?:\[ # optional index specifier like this: [90]
(?:[0-9]+)
\])?
/?
)
[-a-zA-Z0-9_]* # valid characters, repeat this
/ # require a slash
[-a-zA-Z0-9/_]+ # more valid characters, repeat this once or more
(.[a-zA-Z0-9]+)? # optional extension
(?<=")
(?:
(\]/)?\%{property-path}\[? # a recognizeable property path
|((?:\]/)? # or a "simple" path that isn't covered by above
[a-zA-Z] # first character has to be an alpha
[-a-zA-Z0-9_]* # now it can be alpha, hyphen, or number, repeat this
(\[ # optional index specifier like this: [90]
(?:[0-9]+\]/?)? # this is the rest after the opening; optional, "node/foo[" is valid
|/ # or a slash if no opening: sim/
)
)
|\[|\]/? # or a single bracket (closing can have slash): "]", "[", or "]/"
|(?<=prop\(") [-a-zA-Z0-9_]+(?:\[([0-9]+)\])?\[? # or a word like in setprop("foo-bar");
|(?<=\.getNode\(") [-a-zA-Z0-9_]+(?:\[([0-9]+)\])?\[? # or a word like in props.globals.getNode("foo-bar["~index~"]");
|(?<=\.alias\(") [-a-zA-Z0-9_]+(?:\[([0-9]+)\])?\[? # etc.
|(?<=\.initNode\(") [-a-zA-Z0-9_]+(?:\[([0-9]+)\])?\[?
|(?<=\.getValue\(") [-a-zA-Z0-9_]+(?:\[([0-9]+)\])?\[?
|(?<=\.getBoolValue\(") [-a-zA-Z0-9_]+(?:\[([0-9]+)\])?\[?
|(?<=\.setValue\(") [-a-zA-Z0-9_]+(?:\[([0-9]+)\])?\[?
|(?<=\.setBoolValue\(") [-a-zA-Z0-9_]+(?:\[([0-9]+)\])?\[?
|(?<=\.setIntValue\(") [-a-zA-Z0-9_]+(?:\[([0-9]+)\])?\[?
|(?<=\.setDoubleValue\(")[-a-zA-Z0-9_]+(?:\[([0-9]+)\])?\[?
|(?<=\.getChild\(") [-a-zA-Z0-9_]+ # while these are simple names
|(?<=\.getChildren\(") [-a-zA-Z0-9_]+
|(?<=\.removeChild\(") [-a-zA-Z0-9_]+
|(?<=\.removeChildren\(")[-a-zA-Z0-9_]+
)
(?=")
"
"
'
'
\\'
\\"
\\"
\\'
\\'
\\\\'
`
(
[^`\\] # any single character except for backqote or backslash
| # or:
\\( # leading backslash
[\\`abfnrtv] | # single escaped char
N\{[A-Z\ ]+\} | # named unicode character
u[0-9A-Fa-f]{4} | # xxxx - character with 16-bit hex value xxxx
U[0-9A-Fa-f]{8} | # xxxxxxxx - character with 32-bit hex value xxxxxxxx
x[0-9A-Fa-f]{1,2} | # \xhh - character with hex value hh
[0-7]{1,3} # \ooo - character with octal value ooo
)
)
`
(?<![\w\.])
_?cmdarg
arg
me
parents
globals
(?<![\w\.])
import
require
((?<![\w\.])|(?<=globals\.))
append
setsize
subvec
contains
delete
num
keys
pop
size
streq
cmp
abs
chr
sort
substr
sprintf
find
split
rand
typeof
die
call
compile
closure
caller
bind
print
bits\.fld
bits\.sfld
bits\.setfld
bits\.buf
math\.sin
math\.cos
math\.exp
math\.ln
math\.sqrt
math\.atan2
io\.open
io\.close
io\.read
io\.write
io\.seek
io\.tell
io\.readln
io\.stat
utf8\.chstr
utf8\.strc
utf8\.substr
utf8\.size
utf8\.validate
thread\.newthread
thread\.newlock
thread\.lock
thread\.unlock
thread\.newsem
thread\.semdown
thread\.semup
unix\.pipe
unix\.fork
unix\.dup2
unix\.exec
unix\.waitpid
unix\.opendir
unix\.readdir
unix\.closedir
unix\.time
unix\.chdir
unix\.environ
regex\.comp
regex\.exec
sqlite\.open
sqlite\.close
sqlite\.prepare
sqlite\.finalize
readline
getprop
setprop
print
logprint
_fgcommand
settimer
maketimer
_setlistener
removelistener
addcommand
removecommand
_interpolate
rand
srand
abort
directory
resolvepath
parsexml
systime
setlistener
fgcommand
interpolate
isa
abs
defined
thisfunc
printf
sprintf
values
printlog
io\.readfile
io\.load_nasal
io\.read_properties
io\.read_airport_properties
io\.write_properties
io\.readxml
io\.writexml
string\.match
string\.normpath
string\.join
string\.replace
string\.iscntrl
string\.isascii
string\.isupper
string\.islower
string\.isdigit
string\.isblank
string\.ispunct
string\.isxdigit
string\.isspace
string\.isalpha
string\.isalnum
string\.isgraph
string\.isprint
string\.toupper
string\.tolower
string\.isxspace
string\.trim
string\.uc
string\.lc
string\.icmp
string\.imatch
string\.scanf
string\.setcolors
string\.color
gui\.Dialog\.new
gui\.OverlaySelector\.new
gui\.FileSelector\.new
gui\.DirSelector\.new
gui\.findElementByName
gui\.popupTip
gui\.showDialog
gui\.showHelpDialog
gui\.menuEnable
gui\.menuBind
gui\.setCursor
gui\.save_flight
gui\.load_flight
gui\.set_screenshotdir
gui\.property_browser
gui\.dialog_apply
gui\.dialog_update
gui\.enable_widgets
props\.Node\.new
props\.Node
props\.globals
props\.setAll
props\.wrap
props\.wrapNode
props\.copy
props\.dump
props\.nodeList
props\.condition
props\.runBinding
props\._new
props\._globals
props\._getNode
props\._getParent
props\._getChild
props\._getChildren
props\._removeChild
props\._removeChildren
props\._getAliasTarget
props\._getName
props\._getIndex
props\._getType
props\._getAttribute
props\._setAttribute
props\._getValue
props\._setValue
props\._setIntValue
props\._setBoolValue
props\._setDoubleValue
props\._unalias
props\._alias
debug\.dump
debug\.local
debug\.backtrace
debug\.bt
debug\.proptrace
debug\.tree
debug\.string
debug\.attributes
debug\.isnan
debug\.benchmark
debug\.printerror
debug\.warn
debug\.propify
math\.abs
math\.sgn
math\.max
math\.min
math\.avg
math\.pow
math\.mod
math\.asin
math\.acos
math\.tan
math\.log10
math\.to_base
math\.print_base
view\.panViewDir
view\.panViewPitch
view\.resetView
view\.manager\.register
screen\.log\.write
controls\.startEngine
controls\.selectEngine
controls\.stepMagnetos
controls\.centerFlightControls
controls\.throttleAxis
controls\.propellerAxis
controls\.mixtureAxis
controls\.carbHeatAxis
controls\.flapsDown
controls\.wingSweep
controls\.wingsDown
controls\.stepSpoilers
controls\.stepSlats
controls\.elevatorTrim
controls\.aileronTrim
controls\.rudderTrim
controls\.adjThrottle
controls\.adjMixture
controls\.adjCondition
controls\.adjPropeller
controls\.incThrottle
controls\.incAileron
controls\.incElevator
controls\.elevatorTrimAxis
controls\.aileronTrimAxis
controls\.rudderTrimAxis
controls\.gearDown
controls\.gearToggle
controls\.applyBrakes
controls\.applyParkingBrake
controls\.deployChute
controls\.trigger
controls\.ptt
controls\.toggleLights
aircraft\.door\.new
aircraft\.light\.new
aircraft\.lowpass\.new
aircraft\.angular_lowpass\.new
aircraft\.data\.init
aircraft\.data\.load
aircraft\.data\.save
aircraft\.data\.add
aircraft\.timer\.new
aircraft\.livery\.new
aircraft\.livery_update\.new
aircraft\.overlay_update\.new
aircraft\.steering\.init
aircraft\.steering\.setbrakes
aircraft\.autotrim\.init
aircraft\.autotrim\.start
aircraft\.autotrim\.stop
aircraft\.tyresmoke\.new
aircraft\.tyresmoke_system\.new
aircraft\.rain\.init
aircraft\.rain\.update
aircraft\.teleport
aircraft\.wind_speed_from
aircraft\.kias_to_ktas
aircraft\.HUD\.init
aircraft\.HUD\.cycle_color
aircraft\.HUD\.cycle_brightness
aircraft\.HUD\.normal_type
aircraft\.HUD\.cycle_type
aircraft\.HUD\.is_active
aircraft\.crossfeed_valve\.new
screen\.window\.new
screen\.display\.new
screen\.msg_repeat
geo\.Coord\.new
geo\.normdeg
geo\.tile_index
geo\.format
geo\.tile_path
geo\.put_model
geo\.click_position
geo\.aircraft_position
geo\.viewer_position
setlocalprop
getlocalprop
(?<=\.)
initNode
getNode
getType
getName
getPath
getIndex
getValue
getBoolValue
getValues
getParent
getChildren
getChild
getAttribute
setIntValue
setBoolValue
setDoubleValue
setValues
setValue
setAttribute
addChildren
addChild
removeAllChildren
removeChildren
removeChild
remove
clearValue
unalias
alias
.
.
"""
"""
"(?! *~|"")
"
"
'''
'''
'(?! *~|'')
'
'
(?<=<script>)
(?=</script>)
(?<=<open>)
(?=</open>)
(?<=<close>)
(?=</close>)
(?<=<load>)
(?=</load>)
(?<=<unload>)
(?=</unload>)