File: entry_points

package info (click to toggle)
epic5 3.0.3-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 5,328 kB
  • sloc: ansic: 75,810; makefile: 648; ruby: 227; python: 215; sh: 78; perl: 13
file content (105 lines) | stat: -rw-r--r-- 5,279 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
This is my attempt to document just what makes up "The IrcII Language" and
how epic uses the ircII language.  This could be used as a starting point
to replace ircII with something else.

The ircII language is a collection of:
--------------------------------------
* A block parser that runs a string of "ircII statements"
* A statement tokenizer (identify statements in a block)
* A string macro-expander (including function-calling) and dequoter.
* A collection of user created ircII statements
 	(strings that are blocks, and can be used as commands or functions)
* A collection of user created ircII variables: strings that are macros.
* An expression parser that performs mathematical operations.
* A collection of built-in commands that can be used in ircII statements.
* A collection of built-in functions that can be used in irciI expandos.
* A stack of local variables which are constrained to an "atomic scope"

These are the atomic scopes of the ircII language
-------------------------------------------------
* /DEFER runs a string (provided as an argument)
* /LOAD -PF runs a string (provided in a file)
* /EXEC runs a string (provided as argument to -ERROR, END, etc)
* /EXEC runs a string (provided as argument to WAIT %proc -CMD)
* Statemenet parser runs a string (aliases)
* call_function() runs a string (provided as argument to ALIAS)
* do_hook() runs a string (provided as argument to ON)
* key_exec() runs a string (user-created keybindings)
* /QUEUE -RUN runs a string (provided as an argument to QUEUE)
* /WAIT -CMD runs a command (provided as argument)
* /TIMER expiration runs a command (provided as argument to /TIMER)
* /SET runs a string (provided as argument to /ADDSET)
* /WHO callback runs a string (provided as argument to -LINE, -END, etc)
* /ISON callback runs a string (provided as argument to -ON, etc)
* /USERHOST callback runs a string (provided as argument to -CMD)

These run ircII code asynchronously, but not in an atomic scope
---------------------------------------------------------------
* The SEND_LINE keybinding runs the input line as a statement
* /LOAD -STD runs statements (provided in a file)
* /SENDLINE runs a string as a statement (provided as argument)
* Sending message to "/CMD" runs the command + text as a statement
* Dumb mode input runs each line of input as statement (from stdin)
* Expression parser runs a string (the {} operator) (hides function_return)

These run ircII code, but expressly in an existing atomic scope
---------------------------------------------------------------
* /EVAL and /XEVAL runs a string (provided as argument)
* /REDIRECT runs a string (provided as argument)
* /WAIT FOR runs a string (provided as argument)
* /INPUT runs a string (provided as an argument)
* /IF, /DO, /WHILE, /FOREACH run a string (provided as an argument)
* /FE, /FOR .. NEXT, /FOR .. IN, /FOR (,,) run a string (argument)
* /SWITCH, /REPEAT run a string (provided as argument)
* The PARSE_COMMAND keybinding runs a string (provided as argument)
* Perl, Ruby, and Python can all call-back to ircII blocks

These call ircII expressions
----------------------------
* Statements starting with @ or surrounded by () are expressions.
* The ${...} expando is an expression
* /IF, /DO, /WHILE, /FOR, /REPEAT all take expressions
* Perl, Ruby, and Python can all call-back to ircII expressions

These call ircII functions directly
-----------------------------------
* Expression parser calls functions
* do_hook() calls the $cparse() function for implied hooks
* Perl, Ruby, and Python can all call-back to ircII functions.
* /POP, /PUSH, /SHIFT, and /UNSHIFT call functions directly
* $tow(), $afterw() $fromw(), and $beforew() calls $findw() directly
* $uniq() calls $findw() directly

These try to expand $'s or dequote \'s in strings
-------------------------------------------------
* Default values for arglists are expanded
* Each statement is expanded before the command is parsed
* Assignment operators in the expression parser expand the lval.
* The [] operator in expression parser are expanded.
* The operand of the ++ or -- operator is expanded
* For $[...]var, the ... value is expanded. 
* For $(...), the ... value is expanded
* The argument list to a function call is expanded.
* The first argument to $cparse() is expanded if it's double quoted.
* The wildcard pattern in flexible hooks is expanded
* The /FE command expands the word list
* The /FOR var IN (list) command expands the word list
* The /SWITCH command expands the wildcard patterns
* The input prompt is expanded
* The insides of []s in variable names are expanded.
* Stuff written to logfiles is expanded via /SET LOG_REWRITE
* /SET BANNER is expanded if /SET BANNER_EXPAND is on
* The /QUEUE command sometimes expands the commands it runs
* Stuff displayed to windows is expanded via /SET OUTPUT_REWRITE
* The status bar is expanded if /SET STATUS_DOES_EXPANDOS is on
* The %{3}F (status_activity) value is expanded

These places try to extract an lval (variable name) from a string
-----------------------------------------------------------------
* /ASSIGN ...
* /STUB ASSIGN ...
* /LOCAL ...
* The operand after the # or @ operator in the old math parser.
* The operand tokenizer in the math parser
* $unshift(...) and $push(...)