Celestia Syntax Highlighting

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
maxim
Posts: 1036
Joined: 13.11.2003
With us: 15 years 9 months
Location: N?rnberg, Germany

Celestia Syntax Highlighting

Post #1by maxim » 24.06.2005, 14:40

So,

here is some configuration data to be used for syntax highlighting of Celestia celx, cel, stc and ssc files. The complete package, containing configurations for UltraEdit and jEdit can be found here: http://www.celestia.ziegelstein.net/work%20data/CelestiaSyntaxHighlight.zip

For jEdit the configuration has the form of xmode-style xml-files, so these may also be usable for other Editors or IDEs.

Here is an example for celx-files to be used with UltraEdit:

Code: Select all

/L12"Celestia Lua Script" CELX_LANG Line Comment = -- File Extensions = CELX
/Delimiters = ~!@%^&*()-+=|\/{}[];:"'<> ,   .?
/Function String = "%*function*("
/Open Brace Strings =  "{" "(" "["
/Close Brace Strings = "}" ")" "]"
/Indent Strings = "then" "if" "elseif" "else" "while" "do" "for"
/Unindent Strings = "end"
/Open Fold Strings =  "function" "for" "while" "if"
/Close Fold Strings = "end"
/C1"Keywords"
and
break
do
else elseif end
false for function
if in
local
nil not
or
repeat return
then true
until
while
/C2"Lua Objects"
coroutine
debug
io
math
os
string
table
/C3"Lua Methods"
_G _VERSION
abs acos asin assert atan atan2
byte
ceil char clock close collectgarbage concat cos create
date debug def difftime dofile dump
error execute exit exp
find floor flush foreach foreachi format frexp
gcinfo getenv getfenv gethook getinfo getlocal getmetatable getn getupvalue gsub
input insert ipairs
ldexp len lines loadfile loadlib loadstring log log10 lower
max min mod
next
open output
pairs pcall pi pow print
rad random randomseed rawequal rawget rawset read remove rename rep require resume
seek setfenv sethook setlocal setlocale setmetatable setn setupvalue sin sort sqrt status stderr stdin stdout sub
tan time tmpfile tmpname tonumber tostring traceback type
unpack upper
wrap write
xpcall
yield
/C4"Celestia Objects"
celestia celscript
frame
observer object
position
rotation
vector
/C5"Celestia Methods"
absmag addvector
cancelgoto center centerorbit chase createcelscript
deleteview distanceto
find flash follow from fromjulianday
getambient getchildren getcoordinatesystem getfaintestvisible getfov getframe getinfo getlabelflags getlocationflags getminfeaturesize getminorbitsize getobserver getobservers getorbitflags getorientation getposition getrefobject getrenderflags getscreendimension getscriptpath getscripttime getselection getspeed getstar getstarcount getstardistancelimit getstarstyle getsurface gettargeobject gettime gettimescale getx gety getz goto gotodistance gotolocation gotolonglat gotosurface
hide hidelabel
imag isvalid
length lock lookat
mark
name newframe newposition newrotation newvector normalize
orientationto
preloadtexture print
radius real requestkeyboard requestsystemaccess rotate
select setambient setaxisangle setfaintestvisible setfov setframe setlabelflags setlocationflags setminfeaturesize setminorbitsize setorbitflags setorientation setposition setrenderflags setspeed setstardistancelimit setstarstyle setsurface settime settimescale show showlabel singleview slerp spectraltype splitview synchronous
takescreenshot tick to tojulianday track transform travelling type
unmark unmarkall
vectorto
wait
/C6"Operators"
*
+
-
..
/
<
<=
==
>
>=
^
and
not
or
~=
/C7"Flags"
Asteroid
Comet
Invisible
Moon
Planet
Spacecraft
Unknown
asteroids atmospheres
boundaries
chase cloudmaps comets comettails constellations
eclipseshadows ecliptic equatorial
galaxies
locations1.3.2 lock
markers moons
nightmaps
observer orbits
planetographic planets pointstars
spacecraft stars
universal


And here is one for ssc-files:

Code: Select all

/L15"Celestia SSC" SSC_LANG Line Comment = # File Extensions = SSC
/Delimiters = -|\/[]{};:"' ,   .
/Open Brace Strings =  "{" "["
/Close Brace Strings = "}" "]"
/C1"Declarators"
Atmosphere AltSurface
EllipticalOrbit
Location
Rings
/C2"Parameters"
Albedo AscendingNode ArgOfPericenter
Beginning BumpHeight BumpMap BlendTexture
Class CloudHeight CloudMap CloudSpeed Color CustomOrbit
Eccentricity Emissive Ending Epoch EquatorAscendingNode
HazeColor HazeDensity Height
Importance Inclination InfoURL Inner
LongLat LongOfPericenter LongOfRotationAxis Lower
MeanAnomaly Mesh Mass MeanLongitude MeshCenter
NightTexture NormalMap
Oblateness Obliquity Orientation Outer OverlayTexture
Period PrecessionRate
Radius RotationOffset RotationPeriod RotationEpoch
SemiMajorAxis Size Sky SpecularColor SpecularPower SpecularTexture Sunset
Texture Type
Upper


If you find some missing elements, please report.

maxim

amaury
Posts: 32
Joined: 05.03.2006
With us: 13 years 5 months
Location: paris

Post #2by amaury » 03.04.2006, 13:21

Hello Maxim,
here are a few additional flags for the C7 section of the CELX def?° file, namely:
automag, grid, lightdelay, locations, partialtrajectories & smoothlines.

Amaury

Code: Select all

/C7"Flags"
Asteroid
Comet
Invisible
Moon
Planet
Spacecraft
Unknown
automag asteroids atmospheres
boundaries
chase cloudmaps comets comettails constellations
eclipseshadows ecliptic equatorial
grid galaxies
lightdelay locations locations1.3.2 lock
markers moons
nightmaps
observer orbits
partialtrajectories planetographic planets pointstars
ringshadows
smoothlines spacecraft stars
universal

amaury
Posts: 32
Joined: 05.03.2006
With us: 13 years 5 months
Location: paris

Post #3by amaury » 03.04.2006, 13:22

Your lists were very helpful by the way...


Return to “Development”

Who is online

Users browsing this forum: 4 guests