User:Nescius: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(64 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<div style="width:calc(100% - 232px); height:calc(100% + 22px); background-color:transparent; opacity:0.6; overflow:hidden; pointer-events:none; user-select:none; position:absolute; z-index:-1; left:-24px; top:2px"> | |||
<div style="background:linear-gradient(180deg, rgb(38,38,38) 0%, rgba(38,38,38,0) 100%); width:100%; height:250px; position:absolute; z-index:1"></div> | |||
<div style="width:100%; display:flex; justify-content:center; position:absolute; z-index:0"><!-- | |||
--><span style="{{#switch:|false=|-webkit-mask-image:linear-gradient(to right, transparent, black 5%, black 95%, transparent);}}">[[File:Background - Rocket Raccoon.jpg|link=|]]</span><!-- | |||
--><div style="background:linear-gradient(0deg, rgb(38,38,38) 0%, rgba(38,38,38,0) 100%); width:100%; height:250px; position:absolute; z-index:1; bottom:0"></div> | |||
</div> | |||
</div> | |||
{{DISPLAYTITLE:Nescius' notes}} | |||
[[File:nesciusprofileimage.jpg|250px|frameless|right]] | |||
I just want to see my name in blue. You can leave now | I just want to see my name in blue. You can leave now | ||
personal notes: | |||
< | * [https://developer.valvesoftware.com/w/index.php?title=Template:CD/superclass&action=edit Template:CD/superclass] | ||
* [[List of unique entities in Valve Source games]] | |||
* [[List of Source SDK 2013 Entities]] | |||
* [[List of Alien Swarm: Reactive Drop Entities]] | |||
* [[/list of half life ents]] | |||
* [[/Planned language page changes]] | |||
* [[User:Nesciuse]] | |||
* [[Special:PrefixIndex/User:Nescius/]] | |||
* [[/l4d2netprops-compact]] | |||
* [[List of datamap and netprop dumps]] | |||
* [[/favourites]] | |||
* [[Wiki FGD lookup]] (todo) | |||
* [[User:Nescius/command overview]] | |||
regexen: | |||
<pre> | |||
(?:(?<f>{{autolang(?<m>\s*\|\s*))|(?<s>^\s*\|\s*(?!#default|nt|id)(?<lang>\w\w(-\w\w)?\s*=))|(?<toi>(?<oi><onlyinclude>)(?<io><includeonly>))|(?<tio>(?<eio></includeonly>)(?<eoi></onlyinclude>))) | |||
(?{f}{{#switch\: {{{lang|{{ROOTPAGENAME}}}}}$+{m}#default = :(?{s}\t| \u$+{lang}:(?{toi}\r\n$+{io}\r\n\r\n$+{oi}:$+{eoi}\r\n\r\n$+{eio})) | |||
</pre> | |||
<pre> | |||
\[\[(?!#)(?:(?<c>:Category:(?<cl>.*?))|(?<a>Category:(?<al>.*?))|(?<h>:?Help:(?<hl>.*?))|(?<v>:?(?:Project|Valve[ _]Developer[ _]Community):(?<vl>.*?))|(?<s>:?Special:(?<sl>.*?))|(?<m>:?(?!File([ _]talk)?:|Image([ _]talk)?:|Media:|Template([ _]talk)?:|MediaWiki([ _]talk)?:|Talk:|Category[ _]talk:|Project[ _]talk:|Valve[ _]Developer[ _]Community[ _]talk:|Help[ _]talk:|User([ _]talk)?:|c:|commons:|Dictionary:|Google:|GoogleGroups:|IMDB:|M:|Meta:|Metawikipedia:|MW:|SdkBug:|SourceForge:|Steampowered:|W:|Wiki:|WikiBooks:|Wikipedia:|Wikiquote:|Wiktionary:|WP:)(?<ml>.*?)))\]\] | |||
(?{c}{{LCategory|$+{cl}}}:(?{a}{{ACategory|$+{al}}}:(?{h}{{LHelp|$+{hl}}}:(?{v}{{LProject|$+{vl}}}:(?{s}{{LSpecial|$+{sl}}}:(?{m}{{L|$+{ml}}}:)))))) | |||
</pre> | |||
stuff: | |||
<syntaxhighlight lang=c style="background:initial"> | |||
temp_reg = null | temp_reg = null | ||
_stack = { ... } | _stack = { ... } | ||
_registry = { ... } | _registry = { ... } | ||
_table_default_delegate = { ... } //contains table methods | |||
_table_default_delegate = { ... } | _array_default_delegate = { ... } //contains array methods | ||
_array_default_delegate = { ... } | _string_default_delegate = { ... } //contains string methods | ||
_string_default_delegate = { ... } | _number_default_delegate = { ... } //contains integer, float, bool methods | ||
_number_default_delegate = { ... } | _handle_default_delegate = { ... } //contains chandle methods(only tointeger(), used with point_script_use_target) | ||
_handle_default_delegate = { ... } | _utlstringtoken_default_delegate = { ... } //? | ||
_utlstringtoken_default_delegate = { ... } | _generator_default_delegate = { ... } //contains generator methods | ||
_generator_default_delegate = { ... } | _thread_default_delegate = { ... } //contains thread methods | ||
_thread_default_delegate = { ... } | _closure_default_delegate = { ... } //contains function methods | ||
_closure_default_delegate = { ... } | _class_default_delegate = { ... } //contains class methods | ||
_class_default_delegate = { ... } | _instance_default_delegate = { ... } //contains instance methods | ||
_instance_default_delegate = { ... } | _weakref_default_delegate = { ... } //contains weak reference methods | ||
_weakref_default_delegate = { ... } | _metamethodsmap = { | ||
_add: 0 | |||
_sub: 1 | |||
_mul: 2 | |||
_div: 3 | |||
_unm: 4 | |||
_modulo: 5 | |||
_set: 6 | |||
_get: 7 | |||
_typeof: 8 | |||
_nexti: 9 | |||
_cmp: 10 | |||
_call: 11 | |||
_cloned: 12 | |||
_newslot: 13 | |||
_delslot: 14 | |||
_tostring: 15 | |||
_newmember: 16 | |||
_inherited: 17 | |||
} | |||
_lasterror = null | |||
_errorhandler = (native function) //can be set to something else with seterrorhandler() | |||
_consts = { ... } //variables made with const and enum go here (getconsttable()) | _consts = { ... } //variables made with const and enum go here (getconsttable()) | ||
_roottable = { //script and | _roottable = { //script, script_execute and mapspawn.nut executed in this scope (getroottable()) | ||
//global shortcuts { | //global shortcuts { | ||
Line 35: | Line 134: | ||
g_RoundState = { ... } //used by hints and StartBox stuff in sm_utilities | g_RoundState = { ... } //used by hints and StartBox stuff in sm_utilities | ||
g_rr = { ... } // | g_rr = { ... } //response_testbed.nut executed in this scope | ||
GameEventCallbacks = { ... } //OnGameEvent_ | GameEventCallbacks = { ... } //OnGameEvent_ | ||
Line 100: | Line 199: | ||
SPAWN_FLAGS = { ... } //entitygroup related, used in MapSpawns thingy | SPAWN_FLAGS = { ... } //entitygroup related, used in MapSpawns thingy | ||
//entity scopes are created in | //entity scopes are created in _roottable example: | ||
//<uniquestring><targetname or classname if no targetname> = {} | //<uniquestring><targetname or classname if no targetname> = {} | ||
_10dc_worldspawn = { ... } | _10dc_worldspawn = { ... } | ||
//name of this scope is saved in entity's m_iszScriptId | //name of this scope is saved in entity's m_iszScriptId netprop | ||
//entity's RunScriptCode,RunScriptFile inputs create this scope if it doesn't exist and executes script in it | //entity's RunScriptCode,RunScriptFile inputs create this scope if it doesn't exist and executes script in it | ||
//also scripts specified in entity's 'vscripts' keyvalue executed in this scope | //also scripts specified in entity's 'vscripts' keyvalue executed in this scope | ||
} | } | ||
</ | </syntaxhighlight> | ||
'''Squirrel grammar''' | |||
<syntaxhighlight lang=py style="background:initial"> | |||
id:= [a-zA-Z_]+[a-zA-Z_0-9]* //identifier | |||
//literals | |||
IntegerLiteral := [1-9][0-9]* | '0x' [0-9A-Fa-f]+ | ''' [.]+ ''' | 0[0-7]+ | |||
FloatLiteral := [0-9]+ '.' [0-9]+ | |||
FloatLiteral := [0-9]+ '.' 'e'|'E' '+'|'-' [0-9]+ | |||
StringLiteral:= '"'[.]* '"' | |||
VerbatimStringLiteral:= '@''"'[.]* '"' | |||
//operators | |||
bassignops := '+=' | '/=' | '-=' | '*=' | '%=' | '<-' | '=' | | |||
barithops := '+' | '-' | '/' | '*' | '%' | |||
bbitwops := '&' | '^' | '|' | '>>' | '<<' | '>>>' | |||
blogicops := '||' | '&&' | |||
bcompops := '!=' | '==' | '>=' | '<=' | '>' | '<=>' | |||
ulogicops := '!' | |||
urithops := '-' | |||
ubitwops := '~' | |||
uassignops := '++' | '--' | |||
//other? | |||
explist := exp [',' explist] | |||
args := id [',' args] | |||
//expressions | |||
derefexp := id | exp '.' id | |||
exp := '::' id | derefexp | functionexp | |||
exp := derefexp '=' exp | |||
exp := derefexp '<-' exp | |||
exp := exp_cond '?' exp ':' exp | |||
exp := exp binop exp | |||
exp := keyexp 'in' tableexp | |||
exp := instanceexp 'instanceof' classexp | |||
exp := 'typeof' exp | |||
exp := 'clone' exp | |||
exp := exp ',' exp | |||
exp := 'delete' derefexp | |||
tslots := ( id ('='|':') exp | '[' exp ']' '=' exp | '"' [.]* '"' ':' exp) [','] | |||
exp := '{' [tslots]* '}' //table constructor | |||
exp := '[' [explist] ']' //array constructor | |||
exp_cond := exp | |||
initexp := exp | |||
condexp := exp | |||
incexp := exp | |||
functionexp := 'function' '(' args ')' stat | |||
exp := derefexp '(' explist ')' | |||
//statements | |||
stats := stat [';'|'\n'] stats | |||
stat := '{' stats '}' | |||
stat := 'if' '(' exp ')' stat ['else' stat] | |||
stat := 'break' | 'continue' | |||
stat := 'for' '(' [initexp] ';' [condexp] ';' [incexp] ')' stat | |||
stat := 'foreach' '(' [index_id','] value_id 'in' exp ')' stat | |||
stat := 'while' '(' exp ')' stat | |||
stat := 'do' stat 'while' '(' expression ')' | |||
stat := 'switch' '(' exp ')' '{' | |||
'case' case_exp ':' | |||
stats | |||
['default' ':' | |||
stats] | |||
'}' | |||
stat := 'return' [exp] | 'yield' [exp] | |||
initz := id [= exp][',' initz] | |||
stat := 'local' initz | |||
stat := 'const' id '=' IntegerLiteral | FloatLiteral | StringLiteral | |||
enumerations := ( id '=' Integer | FloatLiteral | StringLiteral ) [','] | |||
stat:= 'enum' id '{' enumerations '}' | |||
//funcname := id ['::' id] | |||
functionstat := 'function' id ['::' id]* '(' args ')' [':' '(' args ')'] stat | |||
stat := functionstat | |||
memberdecl := id '=' exp | '[' exp ']' '=' exp | functionstat | 'constructor' functionexp | |||
stat := 'class' derefexp ['extends' derefexp] '{' | |||
[memberdecl]* | |||
'}' | |||
stat := 'try' stat 'catch' '(' id ')' stat | |||
stat := 'throw' [exp] | |||
stat := exp | |||
</syntaxhighlight> |
Latest revision as of 16:19, 31 May 2025
I just want to see my name in blue. You can leave now
personal notes:
- Template:CD/superclass
- List of unique entities in Valve Source games
- List of Source SDK 2013 Entities
- List of Alien Swarm: Reactive Drop Entities
- /list of half life ents
- /Planned language page changes
- User:Nesciuse
- Special:PrefixIndex/User:Nescius/
- /l4d2netprops-compact
- List of datamap and netprop dumps
- /favourites
- Wiki FGD lookup (todo)
- User:Nescius/command overview
regexen:
(?:(?<f>{{autolang(?<m>\s*\|\s*))|(?<s>^\s*\|\s*(?!#default|nt|id)(?<lang>\w\w(-\w\w)?\s*=))|(?<toi>(?<oi><onlyinclude>)(?<io><includeonly>))|(?<tio>(?<eio></includeonly>)(?<eoi></onlyinclude>))) (?{f}{{#switch\: {{{lang|{{ROOTPAGENAME}}}}}$+{m}#default = :(?{s}\t| \u$+{lang}:(?{toi}\r\n$+{io}\r\n\r\n$+{oi}:$+{eoi}\r\n\r\n$+{eio}))
\[\[(?!#)(?:(?<c>:Category:(?<cl>.*?))|(?<a>Category:(?<al>.*?))|(?<h>:?Help:(?<hl>.*?))|(?<v>:?(?:Project|Valve[ _]Developer[ _]Community):(?<vl>.*?))|(?<s>:?Special:(?<sl>.*?))|(?<m>:?(?!File([ _]talk)?:|Image([ _]talk)?:|Media:|Template([ _]talk)?:|MediaWiki([ _]talk)?:|Talk:|Category[ _]talk:|Project[ _]talk:|Valve[ _]Developer[ _]Community[ _]talk:|Help[ _]talk:|User([ _]talk)?:|c:|commons:|Dictionary:|Google:|GoogleGroups:|IMDB:|M:|Meta:|Metawikipedia:|MW:|SdkBug:|SourceForge:|Steampowered:|W:|Wiki:|WikiBooks:|Wikipedia:|Wikiquote:|Wiktionary:|WP:)(?<ml>.*?)))\]\] (?{c}{{LCategory|$+{cl}}}:(?{a}{{ACategory|$+{al}}}:(?{h}{{LHelp|$+{hl}}}:(?{v}{{LProject|$+{vl}}}:(?{s}{{LSpecial|$+{sl}}}:(?{m}{{L|$+{ml}}}:))))))
stuff:
temp_reg = null
_stack = { ... }
_registry = { ... }
_table_default_delegate = { ... } //contains table methods
_array_default_delegate = { ... } //contains array methods
_string_default_delegate = { ... } //contains string methods
_number_default_delegate = { ... } //contains integer, float, bool methods
_handle_default_delegate = { ... } //contains chandle methods(only tointeger(), used with point_script_use_target)
_utlstringtoken_default_delegate = { ... } //?
_generator_default_delegate = { ... } //contains generator methods
_thread_default_delegate = { ... } //contains thread methods
_closure_default_delegate = { ... } //contains function methods
_class_default_delegate = { ... } //contains class methods
_instance_default_delegate = { ... } //contains instance methods
_weakref_default_delegate = { ... } //contains weak reference methods
_metamethodsmap = {
_add: 0
_sub: 1
_mul: 2
_div: 3
_unm: 4
_modulo: 5
_set: 6
_get: 7
_typeof: 8
_nexti: 9
_cmp: 10
_call: 11
_cloned: 12
_newslot: 13
_delslot: 14
_tostring: 15
_newmember: 16
_inherited: 17
}
_lasterror = null
_errorhandler = (native function) //can be set to something else with seterrorhandler()
_consts = { ... } //variables made with const and enum go here (getconsttable())
_roottable = { //script, script_execute and mapspawn.nut executed in this scope (getroottable())
//global shortcuts {
g_ModeScript = DirectorScript.MapScript.ChallengeScript
g_MapScript = DirectorScript.MapScript
SessionOptions = g_ModeScript.DirectorOptions
SessionState = g_ModeScript.MutationState
SessionSpawns = g_MapScript.MapSpawns
// }
g_RoundState = { ... } //used by hints and StartBox stuff in sm_utilities
g_rr = { ... } //response_testbed.nut executed in this scope
GameEventCallbacks = { ... } //OnGameEvent_
ScriptEventCallbacks = { ... } //OnScriptEvent_
DirectorScript = { //director_base.nut executed in this scope
DirectorOptions = { ... } //4
MapScript = { //mapscripts, trigger_finale scripts and scriptedmode.nut executed in this scope
DirectorOptions = { ... } //3
BaseScriptedDOTable = { ... } //added into ChallengeScript.DirectorOptions
//these come from mapscripts {
MapOptions = { ... } //added into ChallengeScript.DirectorOptions
MapState = { ... } //added into ChallengeScript.MutationState
MapSpawns = [] //entity groups to spawn
SanitizeTable = { ... } //entities to remove
// }
ChallengeScript = { //modescripts executed in this scope
MutationOptions = { ... } //added into DirectorOptions (below)
MutationState = { ... }
ModeSpawns = [] //added into MapSpawns
DirectorOptions = { ... } //1
}
LocalScript = { //director's BeginScript input runs script in this scope
DirectorOptions = { ... } //2
}
ScriptedDamageInfo = { ... } //used by AllowTakeDamage
//entity group related
EntityGroups = { ... }
InstancedEntityGroup = { ... }
ReplacementParms = { ... }
UniqueTargetnames = { ... }
//startbox related
StartboxFloating_Info = { ... }
StartboxCenter_Info = { ... }
StartboxSpeedbump_Info = { ... }
defaultClearout = { ... } //for clearout (used in holdout)
}
}
g_ClearoutTable = { ... } //for clearout (used in holdout)
//script_debug commands related
ScriptDebugTraces = { ... }
ScriptDebugTextFilters = { ... }
//documentation
_PublishedHelp = { ... }
Documentation = {
classes = { ... }
instances = { ... }
functions = { ... }
}
SPAWN_FLAGS = { ... } //entitygroup related, used in MapSpawns thingy
//entity scopes are created in _roottable example:
//<uniquestring><targetname or classname if no targetname> = {}
_10dc_worldspawn = { ... }
//name of this scope is saved in entity's m_iszScriptId netprop
//entity's RunScriptCode,RunScriptFile inputs create this scope if it doesn't exist and executes script in it
//also scripts specified in entity's 'vscripts' keyvalue executed in this scope
}
Squirrel grammar
id:= [a-zA-Z_]+[a-zA-Z_0-9]* //identifier
//literals
IntegerLiteral := [1-9][0-9]* | '0x' [0-9A-Fa-f]+ | ''' [.]+ ''' | 0[0-7]+
FloatLiteral := [0-9]+ '.' [0-9]+
FloatLiteral := [0-9]+ '.' 'e'|'E' '+'|'-' [0-9]+
StringLiteral:= '"'[.]* '"'
VerbatimStringLiteral:= '@''"'[.]* '"'
//operators
bassignops := '+=' | '/=' | '-=' | '*=' | '%=' | '<-' | '=' |
barithops := '+' | '-' | '/' | '*' | '%'
bbitwops := '&' | '^' | '|' | '>>' | '<<' | '>>>'
blogicops := '||' | '&&'
bcompops := '!=' | '==' | '>=' | '<=' | '>' | '<=>'
ulogicops := '!'
urithops := '-'
ubitwops := '~'
uassignops := '++' | '--'
//other?
explist := exp [',' explist]
args := id [',' args]
//expressions
derefexp := id | exp '.' id
exp := '::' id | derefexp | functionexp
exp := derefexp '=' exp
exp := derefexp '<-' exp
exp := exp_cond '?' exp ':' exp
exp := exp binop exp
exp := keyexp 'in' tableexp
exp := instanceexp 'instanceof' classexp
exp := 'typeof' exp
exp := 'clone' exp
exp := exp ',' exp
exp := 'delete' derefexp
tslots := ( id ('='|':') exp | '[' exp ']' '=' exp | '"' [.]* '"' ':' exp) [',']
exp := '{' [tslots]* '}' //table constructor
exp := '[' [explist] ']' //array constructor
exp_cond := exp
initexp := exp
condexp := exp
incexp := exp
functionexp := 'function' '(' args ')' stat
exp := derefexp '(' explist ')'
//statements
stats := stat [';'|'\n'] stats
stat := '{' stats '}'
stat := 'if' '(' exp ')' stat ['else' stat]
stat := 'break' | 'continue'
stat := 'for' '(' [initexp] ';' [condexp] ';' [incexp] ')' stat
stat := 'foreach' '(' [index_id','] value_id 'in' exp ')' stat
stat := 'while' '(' exp ')' stat
stat := 'do' stat 'while' '(' expression ')'
stat := 'switch' '(' exp ')' '{'
'case' case_exp ':'
stats
['default' ':'
stats]
'}'
stat := 'return' [exp] | 'yield' [exp]
initz := id [= exp][',' initz]
stat := 'local' initz
stat := 'const' id '=' IntegerLiteral | FloatLiteral | StringLiteral
enumerations := ( id '=' Integer | FloatLiteral | StringLiteral ) [',']
stat:= 'enum' id '{' enumerations '}'
//funcname := id ['::' id]
functionstat := 'function' id ['::' id]* '(' args ')' [':' '(' args ')'] stat
stat := functionstat
memberdecl := id '=' exp | '[' exp ']' '=' exp | functionstat | 'constructor' functionexp
stat := 'class' derefexp ['extends' derefexp] '{'
[memberdecl]*
'}'
stat := 'try' stat 'catch' '(' id ')' stat
stat := 'throw' [exp]
stat := exp