mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-27 16:49:31 +00:00
Handle events in text interpolation; capture text events in choice lines; improve test script
This commit is contained in:
parent
633f7b2d61
commit
7105b445ef
103 changed files with 2452 additions and 1294 deletions
62
README.md
62
README.md
|
|
@ -56,7 +56,7 @@ HELLO SIR, HOW ARE YOU TODAY
|
|||
> Sure is!
|
||||
YEAH. YEAH.
|
||||
> I've seen better.
|
||||
ENTITLED PRICK.
|
||||
NOT NICE.
|
||||
|
||||
WELL, GOOD BYE.
|
||||
```
|
||||
|
|
@ -156,12 +156,16 @@ There's different types of lines, depending on their first character(s) (after i
|
|||
This is.
|
||||
```
|
||||
|
||||
* `>`: write a choice into the event buffer. Followed by arbitrary text. Support [text interpolation](#text-interpolation).
|
||||
* `>`: write a choice into the event buffer. Followed by arbitrary text. Support [text interpolation](#text-interpolation); if a text event is created during the text interpolation, it is added to the choice text content instead of the global event buffer.
|
||||
|
||||
```
|
||||
$ f
|
||||
Third choice
|
||||
|
||||
> First choice
|
||||
> Second choice
|
||||
> Last choice
|
||||
> {f}
|
||||
```
|
||||
|
||||
* `$`: function line. Followed by an [identifier](#identifiers), then eventually an [alias](#aliases), and eventually a parameter list. Define a function using its children as function body. Also define a new namespace for its children (using the function name if it has no arguments, or a unique name otherwise).
|
||||
|
|
@ -268,9 +272,9 @@ $ inane dialog
|
|||
Checkpoints always have the following variable defined in its namespace by default:
|
||||
|
||||
`👁️`: number, number of times the checkpoint was executed before
|
||||
`🏁`: number, number of times the checkpoint was reached before (including times where it was resumed from and executed)
|
||||
`🏁`: number, number of times the checkpoint was reached before (includes times where it was resumed from and executed)
|
||||
|
||||
* `#`: tag line. Can be followed by an [expression](#expressions); otherwise nil expression is assumed. The results of the [expression](#expressions) will be added to the tags send along with any event sent from its children. Can be nested.
|
||||
* `#`: tag line. Can be followed by an [expression](#expressions); otherwise nil expression is assumed. The results of the [expression](#expressions) will be added to the tags send along with any `choice` or `text` event sent from its children. Can be nested.
|
||||
|
||||
```
|
||||
# "color": "red"
|
||||
|
|
@ -298,7 +302,9 @@ $ hey
|
|||
{hey} = 5
|
||||
```
|
||||
|
||||
Be careful when using `@` in a choice block. Choice blocks are not ran right as they are read, but at the next event flush (i.e. empty line). This means that if there is no flush in the function itself, the choice will be ran *after* the function has already been executed and returning a value at this point makes no sense:
|
||||
Please note that Anselme will discard returns values sent from within a choice block. Returns inside choice block still have the expected behaviour of stopping the execution of the choice block.
|
||||
|
||||
This is the case because choice blocks are not ran right as they are read, but only at the next event flush (i.e. empty line). This means that if there is no flush in the function itself, the choice will be ran *after* the function has already been executed and returning a value at this point makes no sense:
|
||||
|
||||
```
|
||||
$ f
|
||||
|
|
@ -315,9 +321,7 @@ $ f
|
|||
|
||||
```
|
||||
|
||||
For this reason, Anselme will discard returns values sent from within a choice block. Returns inside choice block still have the expected behaviour of stopping the execution of the block.
|
||||
|
||||
* empty line: flush events, i.e., if there are any pending lines of text or choices, send them to your game. See [Event buffer](#event-buffer). This line always keep the same identation as the last non-empty line, so you don't need to put invisible whitespace on an empty-looking line. Is also automatically added at the end of a file.
|
||||
* empty line: flush the event buffer, i.e., if there are any pending lines of text or choices, send them to your game. See [Event buffer](#event-buffer). This line always keep the same identation as the last non-empty line, so you don't need to put invisible whitespace on an empty-looking line. Is also automatically added at the end of a file.
|
||||
|
||||
* regular text: write some text into the event buffer. Support [text interpolation](#text-interpolation).
|
||||
|
||||
|
|
@ -395,21 +399,47 @@ $ loop
|
|||
|
||||
### Text interpolation
|
||||
|
||||
Text and choice lines allow for arbitrary text. Expression can be evaluated and inserted into the text as the line is executed by enclosing the [expression](#expressions) into brackets.
|
||||
Text and choice lines allow for arbitrary text. Expression can be evaluated and inserted into the text as the line is executed by enclosing the [expression](#expressions) into brackets. The expressions are evaluated in the same order as the reading direction.
|
||||
|
||||
The expression is automatically wrapped in a call to `{}(expr)`. You can overload `{}` to change its behaviour for custom types; main intended use is to provide some pretty-printing function.
|
||||
|
||||
Note that events can be sent from the interpolated expression as usual. So you may not want to send a choice event or flush the event buffer from, for example, an interpolated expression in a text line, as your text line will be cut in two with the flush or choice between the two halves.
|
||||
|
||||
Text interpolated in choices have the special property of capturing text events into the choice text.
|
||||
|
||||
```
|
||||
:a = 5
|
||||
|
||||
Value of a: {a}
|
||||
```
|
||||
|
||||
The expression is automatically wrapped in a call to `{}(expr)`. You can overload `{}` to change its behaviour for custom types.
|
||||
(in text and choices, text events created from an interpolated expression are included in the final text)
|
||||
$ f
|
||||
wor
|
||||
(the returned value comes after)
|
||||
@"ld."
|
||||
|
||||
(Will print "Hello world.")
|
||||
Hello {f}
|
||||
|
||||
> Hello {f}
|
||||
|
||||
(keep in mind that events are also sent as usual in places that would usually not send event and thus can't really handle them in a sensible manner)
|
||||
(for example in text litterals: this will send a "wor" text event and put "ld." in b)
|
||||
:b = "{f}"
|
||||
```
|
||||
|
||||
### Event buffer
|
||||
|
||||
Since Lua mainly run into a signle thread, Anselme need to give back control to the game at some point. This is done with flush event lines (empty lines), where the intrepreter yield its coroutine and returns a buch of data to your game (called the event buffer). It's called an event buffer because, well, it's a buffer, and events are what we call whatever Anselme sends back to your game.
|
||||
Anselme need to give back control to the game at some point. This is done through events: the interpreter regularly yield its coroutine and returns a buch of data to your game (called the event buffer or just "event"). It's called an event buffer because, well, it's a buffer, and events are what we call whatever Anselme sends back to your game.
|
||||
|
||||
As Anselme interpret the script, it keeps a buffer of events that will be sent to your game on the next event flush line. These events are, by default, either text, choice or return (this one sent when the script end).
|
||||
Each event have a type (`text`, `choice`, `return` or `error` by default, custom types can also be defined) and associated data; the data associated with each event depends on its type. For the default events this data is:
|
||||
|
||||
* `text` (text to display) is a list of text elements, each with a `text` field, containing the text contents, and a `tags` field, containing the tags associated with this text.
|
||||
* `choice` (choices to choose from) is a list of tableas, each associated to a choice. Each of these choice is a list of text elements like for the `text` event.
|
||||
* `return` (when the script ends) is the returned value.
|
||||
* `error` (when the script error) is the error message.
|
||||
|
||||
For some event types (`text` and `choice`), Anselme does not immediately sends the event as soon as they are available but appends them to a buffer of events that will be sent to your game on the next event flush line (empty lines).
|
||||
|
||||
```
|
||||
Some text.
|
||||
|
|
@ -419,7 +449,7 @@ Another text.
|
|||
Text in another event.
|
||||
```
|
||||
|
||||
Beyond theses pragmatic reasons, the event buffering also serves as a way to group together several lines. For example, choice A and B will be sent to the game at the same time and can therefore be assumed to be part of the same "choice block", as opposed to choice C wich will be sent alone:
|
||||
Beyond technical reasons, the event buffering also serves as a way to group together several lines. For example, choice A and B will be sent to the game at the same time and can therefore be assumed to be part of the same "choice block", as opposed to choice C wich will be sent alone:
|
||||
|
||||
```
|
||||
> Choice A
|
||||
|
|
@ -439,15 +469,13 @@ $ reusable choice
|
|||
> Choice C
|
||||
```
|
||||
|
||||
Anselme will also flush events when the current event type change, so your game only has to handle a single event of a single type at a time. For example, this will send a text event, flush it, and then buffer a choice event:
|
||||
Besides empty lines, Anselme will also automatically flush events when the current event type change (when reaching a choice line with a text event in the event buffer, or vice versa), so your game only has to handle a single event of a single type at a time. For example, this will send a text event, flush it, and then buffer a choice event:
|
||||
|
||||
```
|
||||
Text
|
||||
> Choice
|
||||
```
|
||||
|
||||
Every event have a type (`text`, `choice`, `return` or `error` by default, custom types can also be defined), and consist of a `data` field, containing its contents, and a `tags` field, containing the tags at the time the event was created.
|
||||
|
||||
### Identifiers
|
||||
|
||||
Valid identifiers must be at least 1 caracters long and can contain anything except the caracters ``~`^+-=<>/[]*{}|\_!?,;:()"@&$#%`` (that is, every special caracter on a US keyboard except '). They can contain spaces. They can not start with a number.
|
||||
|
|
|
|||
10
anselme.lua
10
anselme.lua
|
|
@ -6,11 +6,11 @@ local anselme = {
|
|||
-- api is incremented a each update which may break Lua API compatibility
|
||||
versions = {
|
||||
save = 1,
|
||||
language = 15,
|
||||
api = 1
|
||||
language = 16,
|
||||
api = 2
|
||||
},
|
||||
-- version is incremented at each update
|
||||
version = 16,
|
||||
version = 17,
|
||||
--- currently running interpreter
|
||||
running = nil
|
||||
}
|
||||
|
|
@ -336,6 +336,7 @@ local vm_mt = {
|
|||
end,
|
||||
|
||||
--- set aliases for built-in variables 👁️, 🔖 and 🏁 that will be defined on every new checkpoint and function
|
||||
-- this does not affect variables that were defined before this function was called
|
||||
-- nil for no alias
|
||||
-- return self
|
||||
setaliases = function(self, seen, checkpoint, reached)
|
||||
|
|
@ -461,9 +462,10 @@ local vm_mt = {
|
|||
event_buffer = nil,
|
||||
-- choice event
|
||||
choice_selected = nil,
|
||||
choice_available = {},
|
||||
-- skip next choices until next event change (to skip currently running choice block when resuming from a checkpoint)
|
||||
skip_choices_until_flush = nil,
|
||||
-- captured events stack {[event type]=stack{fn, ...}, ...}
|
||||
event_capture_stack = {},
|
||||
-- interrupt
|
||||
interrupt = nil,
|
||||
-- tag stack
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ local eval
|
|||
|
||||
local common
|
||||
common = {
|
||||
-- flush interpreter state to global state
|
||||
--- merge interpreter state with global state
|
||||
merge_state = function(state)
|
||||
local global_vars = state.interpreter.global_state.variables
|
||||
for var, value in pairs(state.variables) do
|
||||
|
|
@ -11,7 +11,7 @@ common = {
|
|||
state.variables[var] = nil
|
||||
end
|
||||
end,
|
||||
-- returns a variable's value, evaluating a pending expression if neccessary
|
||||
--- returns a variable's value, evaluating a pending expression if neccessary
|
||||
-- if you're sure the variable has already been evaluated, use state.variables[fqm] directly
|
||||
-- return var
|
||||
-- return nil, err
|
||||
|
|
@ -28,7 +28,7 @@ common = {
|
|||
return var
|
||||
end
|
||||
end,
|
||||
-- check truthyness of an anselme value
|
||||
--- check truthyness of an anselme value
|
||||
truthy = function(val)
|
||||
if val.type == "number" then
|
||||
return val.value ~= 0
|
||||
|
|
@ -38,7 +38,7 @@ common = {
|
|||
return true
|
||||
end
|
||||
end,
|
||||
-- compare two anselme value for equality
|
||||
--- compare two anselme value for equality
|
||||
compare = function(a, b)
|
||||
if a.type ~= b.type then
|
||||
return false
|
||||
|
|
@ -59,10 +59,10 @@ common = {
|
|||
return a.value == b.value
|
||||
end
|
||||
end,
|
||||
-- format a anselme value to something printable
|
||||
--- format a anselme value to something printable
|
||||
-- does not call custom {}() functions, only built-in ones, so it should not be able to fail
|
||||
-- str: if success
|
||||
-- * nil, err: if error
|
||||
-- nil, err: if error
|
||||
format = function(val)
|
||||
if atypes[val.type] and atypes[val.type].format then
|
||||
return atypes[val.type].format(val.value)
|
||||
|
|
@ -70,8 +70,9 @@ common = {
|
|||
return nil, ("no formatter for type %q"):format(val.type)
|
||||
end
|
||||
end,
|
||||
--- convert anselme value to lua
|
||||
-- lua value: if success (may be nil!)
|
||||
-- * nil, err: if error
|
||||
-- nil, err: if error
|
||||
to_lua = function(val)
|
||||
if atypes[val.type] and atypes[val.type].to_lua then
|
||||
return atypes[val.type].to_lua(val.value)
|
||||
|
|
@ -79,8 +80,9 @@ common = {
|
|||
return nil, ("no Lua exporter for type %q"):format(val.type)
|
||||
end
|
||||
end,
|
||||
--- convert lua value to anselme
|
||||
-- anselme value: if success
|
||||
-- * nil, err: if error
|
||||
-- nil, err: if error
|
||||
from_lua = function(val)
|
||||
if ltypes[type(val)] and ltypes[type(val)].to_anselme then
|
||||
return ltypes[type(val)].to_anselme(val)
|
||||
|
|
@ -88,23 +90,36 @@ common = {
|
|||
return nil, ("no Lua importer for type %q"):format(type(val))
|
||||
end
|
||||
end,
|
||||
--- evaluate a text AST into a single Lua string
|
||||
-- string: if success
|
||||
-- * nil, err: if error
|
||||
-- nil, err: if error
|
||||
eval_text = function(state, text)
|
||||
local s = ""
|
||||
local l = {}
|
||||
common.eval_text_callback(state, text, function(str) table.insert(l, str) end)
|
||||
return table.concat(l)
|
||||
end,
|
||||
--- same as eval_text, but instead of building a Lua string, call callback for every evaluated part of the text
|
||||
-- callback returns nil, err in case of error
|
||||
-- true: if success
|
||||
-- nil, err: if error
|
||||
eval_text_callback = function(state, text, callback)
|
||||
for _, item in ipairs(text) do
|
||||
if type(item) == "string" then
|
||||
s = s .. item
|
||||
callback(item)
|
||||
else
|
||||
local v, e = eval(state, item)
|
||||
if not v then return v, e end
|
||||
v, e = common.format(v)
|
||||
if not v then return v, e end
|
||||
s = s .. v
|
||||
if v ~= "" then
|
||||
local r, err = callback(v)
|
||||
if err then return r, err end
|
||||
end
|
||||
end
|
||||
end
|
||||
return s
|
||||
return true
|
||||
end,
|
||||
--- check if an anselme value is of a certain type
|
||||
-- specificity(number): if var is of type type
|
||||
-- false: if not
|
||||
is_of_type = function(var, type)
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ local function eval(state, exp)
|
|||
ret, e = run(state, fn.child)
|
||||
-- resume at last checkpoint
|
||||
else
|
||||
local expr, err = expression(checkpoint.value, state, "")
|
||||
local expr, err = expression(checkpoint.value, state, fn.namespace)
|
||||
if not expr then return expr, err end
|
||||
ret, e = eval(state, expr)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
local eval
|
||||
local truthy, merge_state, to_lua, eval_text, escape, get_variable
|
||||
local truthy, merge_state, to_lua, escape, get_variable, eval_text_callback
|
||||
local run_line, run_block
|
||||
|
||||
--- tag management
|
||||
local tags = {
|
||||
--- push new tags on top of the stack, from Anselme values
|
||||
push = function(self, state, val)
|
||||
|
|
@ -13,10 +15,12 @@ local tags = {
|
|||
for k, v in pairs(to_lua(val)) do new[k] = v end
|
||||
-- add
|
||||
table.insert(state.interpreter.tags, new)
|
||||
return self:len(state)
|
||||
end,
|
||||
--- same but do not merge with last stack item
|
||||
push_lua_no_merge = function(self, state, val)
|
||||
table.insert(state.interpreter.tags, val)
|
||||
return self:len(state)
|
||||
end,
|
||||
-- pop tag table on top of the stack
|
||||
pop = function(self, state)
|
||||
|
|
@ -31,6 +35,8 @@ local tags = {
|
|||
return #state.interpreter.tags
|
||||
end,
|
||||
--- pop item until we reached desired stack length
|
||||
-- try to prefer this to pop if possible, so in case we mess up the stack somehow it will restore the stack to a good state
|
||||
-- (we may allow tag push/pop from the user side at some point)
|
||||
trim = function(self, state, len)
|
||||
while #state.interpreter.tags > len do
|
||||
self:pop(state)
|
||||
|
|
@ -38,31 +44,120 @@ local tags = {
|
|||
end
|
||||
}
|
||||
|
||||
local function write_event(state, type, data)
|
||||
if state.interpreter.event_buffer and state.interpreter.event_type ~= type then
|
||||
error(("previous event of type %q has not been flushed, can't write new %q event"):format(state.interpreter.event_type, type))
|
||||
end
|
||||
if not state.interpreter.event_buffer then
|
||||
state.interpreter.event_type = type
|
||||
state.interpreter.event_buffer = {}
|
||||
end
|
||||
table.insert(state.interpreter.event_buffer, { data = data, tags = tags:current(state) })
|
||||
end
|
||||
--- event buffer management
|
||||
-- i.e. only for text and choice events
|
||||
local events = {
|
||||
--- add a new element to the event buffer
|
||||
-- will flush if needed
|
||||
-- returns true in case of success
|
||||
-- returns nil, err in case of error
|
||||
append = function(self, state, type, data)
|
||||
if state.interpreter.event_capture_stack[type] then
|
||||
local r, e = state.interpreter.event_capture_stack[type][#state.interpreter.event_capture_stack[type]](data)
|
||||
if not r then return r, e end
|
||||
else
|
||||
local r, e = self:make_space_for(state, type)
|
||||
if not r then return r, e end
|
||||
|
||||
local run_block
|
||||
if not state.interpreter.event_buffer then
|
||||
state.interpreter.event_type = type
|
||||
state.interpreter.event_buffer = {}
|
||||
end
|
||||
|
||||
table.insert(state.interpreter.event_buffer, data)
|
||||
end
|
||||
return true
|
||||
end,
|
||||
--- add a new item in the last element (a list of elements) of the event buffer
|
||||
-- will flush if needed
|
||||
-- will use default or a new list if buffer is empty
|
||||
-- returns true in case of success
|
||||
-- returns nil, err in case of error
|
||||
append_in_last = function(self, state, type, data, default)
|
||||
local r, e = self:make_space_for(state, type)
|
||||
if not r then return r, e end
|
||||
|
||||
if not state.interpreter.event_buffer then
|
||||
r, e = self:append(state, type, default or {})
|
||||
if not r then return r, e end
|
||||
end
|
||||
|
||||
table.insert(state.interpreter.event_buffer[#state.interpreter.event_buffer], data)
|
||||
|
||||
return true
|
||||
end,
|
||||
|
||||
--- start capturing events of a certain type
|
||||
-- when an event of the type is appended, fn will be called with this event data
|
||||
-- and the event will not be added to the event buffer
|
||||
-- fn returns nil, err in case of error
|
||||
push_capture = function(self, state, type, fn)
|
||||
if not state.interpreter.event_capture_stack[type] then
|
||||
state.interpreter.event_capture_stack[type] = {}
|
||||
end
|
||||
table.insert(state.interpreter.event_capture_stack[type], fn)
|
||||
end,
|
||||
--- stop capturing events of a certain type.
|
||||
-- must be called after a push_capture
|
||||
-- this is handled by a stack so nested capturing is allowed.
|
||||
pop_capture = function(self, state, type)
|
||||
table.remove(state.interpreter.event_capture_stack[type])
|
||||
if #state.interpreter.event_capture_stack[type] == 0 then
|
||||
state.interpreter.event_capture_stack[type] = nil
|
||||
end
|
||||
end,
|
||||
|
||||
-- flush event buffer if it's neccessary to push an event of the given type
|
||||
-- returns true in case of success
|
||||
-- returns nil, err in case of error
|
||||
make_space_for = function(self, state, type)
|
||||
if state.interpreter.event_buffer and state.interpreter.event_type ~= type and not state.interpreter.event_capture_stack[type] then
|
||||
return self:flush(state)
|
||||
end
|
||||
return true
|
||||
end,
|
||||
--- flush events and send them to the game if possible
|
||||
-- returns true in case of success
|
||||
-- returns nil, err in case of error
|
||||
flush = function(self, state)
|
||||
while state.interpreter.event_buffer do
|
||||
local type, buffer = state.interpreter.event_type, state.interpreter.event_buffer
|
||||
state.interpreter.event_type = nil
|
||||
state.interpreter.event_buffer = nil
|
||||
state.interpreter.skip_choices_until_flush = nil
|
||||
-- yield
|
||||
coroutine.yield(type, buffer)
|
||||
-- run choice
|
||||
if type == "choice" then
|
||||
local sel = state.interpreter.choice_selected
|
||||
state.interpreter.choice_selected = nil
|
||||
if not sel or sel < 1 or sel > #buffer then
|
||||
return nil, "invalid choice"
|
||||
else
|
||||
local choice = buffer[sel]._d
|
||||
-- execute in expected tag & event capture state
|
||||
local capture_state = state.interpreter.event_capture_stack
|
||||
state.interpreter.event_capture_stack = {}
|
||||
local i = tags:push_lua_no_merge(state, choice.tags)
|
||||
local _, e = run_block(state, choice.block)
|
||||
tags:trim(state, i-1)
|
||||
state.interpreter.event_capture_stack = capture_state
|
||||
if e then return nil, e end
|
||||
-- we discard return value from choice block as the execution is delayed until an event flush
|
||||
-- and we don't want to stop the execution of another function unexpectedly
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
-- returns var in case of success and there is a return
|
||||
-- return nil in case of success and there is no return
|
||||
-- return nil, err in case of error
|
||||
local function run_line(state, line)
|
||||
run_line = function(state, line)
|
||||
-- store line
|
||||
state.interpreter.running_line = line
|
||||
-- if line intend to push an event, flush buffer it it's a different event
|
||||
if line.push_event and state.interpreter.event_buffer and state.interpreter.event_type ~= line.push_event then
|
||||
local v, e = run_line(state, { source = line.source, type = "flush_events" })
|
||||
if e then return v, e end
|
||||
if v then return v end
|
||||
end
|
||||
-- line types
|
||||
if line.type == "condition" then
|
||||
line.parent_block.last_condition_success = nil
|
||||
|
|
@ -86,19 +181,27 @@ local function run_line(state, line)
|
|||
end
|
||||
end
|
||||
elseif line.type == "choice" then
|
||||
local t, er = eval_text(state, line.text)
|
||||
if not t then return t, er end
|
||||
table.insert(state.interpreter.choice_available, {
|
||||
tags = tags:current(state),
|
||||
block = line.child
|
||||
})
|
||||
write_event(state, "choice", t)
|
||||
local v, e = events:make_space_for(state, "choice")
|
||||
if not v then return v, ("%s; in automatic event flush at %s"):format(e, line.source) end
|
||||
local currentTags = tags:current(state)
|
||||
v, e = events:append(state, "choice", { _d = { tags = currentTags, block = line.child }}) -- new choice
|
||||
if not v then return v, e end
|
||||
events:push_capture(state, "text", function(event)
|
||||
local v2, e2 = events:append_in_last(state, "choice", event, { _d = { tags = currentTags, block = line.child }})
|
||||
if not v2 then return v2, e2 end
|
||||
end)
|
||||
v, e = eval_text_callback(state, line.text, function(text)
|
||||
local v2, e2 = events:append_in_last(state, "choice", { text = text, tags = currentTags }, { _d = { tags = currentTags, block = line.child }})
|
||||
if not v2 then return v2, e2 end
|
||||
end)
|
||||
events:pop_capture(state, "text")
|
||||
if not v then return v, ("%s; at %s"):format(e, line.source) end
|
||||
elseif line.type == "tag" then
|
||||
local v, e = eval(state, line.expression)
|
||||
if not v then return v, ("%s; at %s"):format(e, line.source) end
|
||||
tags:push(state, v)
|
||||
local i = tags:push(state, v)
|
||||
v, e = run_block(state, line.child)
|
||||
tags:pop(state)
|
||||
tags:trim(state, i-1)
|
||||
if e then return v, e end
|
||||
if v then return v end
|
||||
elseif line.type == "return" then
|
||||
|
|
@ -106,34 +209,18 @@ local function run_line(state, line)
|
|||
if not v then return v, ("%s; at %s"):format(e, line.source) end
|
||||
return v
|
||||
elseif line.type == "text" then
|
||||
local t, er = eval_text(state, line.text)
|
||||
if not t then return t, ("%s; at %s"):format(er, line.source) end
|
||||
write_event(state, "text", t)
|
||||
local v, e = events:make_space_for(state, "text") -- do this before any evaluation start
|
||||
if not v then return v, ("%s; in automatic event flush at %s"):format(e, line.source) end
|
||||
local currentTags = tags:current(state)
|
||||
v, e = eval_text_callback(state, line.text, function(text)
|
||||
-- why you would want to send a non-text event from there, I have no idea, but I'm not going to stop you
|
||||
local v2, e2 = events:append(state, "text", { text = text, tags = currentTags })
|
||||
if not v2 then return v2, e2 end
|
||||
end)
|
||||
if not v then return v, ("%s; at %s"):format(e, line.source) end
|
||||
elseif line.type == "flush_events" then
|
||||
while state.interpreter.event_buffer do
|
||||
local type, buffer = state.interpreter.event_type, state.interpreter.event_buffer
|
||||
state.interpreter.event_type = nil
|
||||
state.interpreter.event_buffer = nil
|
||||
-- yield
|
||||
coroutine.yield(type, buffer)
|
||||
-- run choice
|
||||
if type == "choice" then
|
||||
local sel = state.interpreter.choice_selected
|
||||
state.interpreter.choice_selected = nil
|
||||
if not sel or sel < 1 or sel > #state.interpreter.choice_available then
|
||||
return nil, "invalid choice"
|
||||
else
|
||||
local choice = state.interpreter.choice_available[sel]
|
||||
state.interpreter.choice_available = {}
|
||||
tags:push_lua_no_merge(state, choice.tags)
|
||||
local v, e = run_block(state, choice.block)
|
||||
tags:pop(state)
|
||||
if e then return v, e end
|
||||
-- discard return value from choice block as the execution is delayed until an event flush
|
||||
-- and we don't want to stop the execution of another function unexpectedly
|
||||
end
|
||||
end
|
||||
end
|
||||
local v, e = events:flush(state)
|
||||
if not v then return v, ("%s; in event flush at %s"):format(e, line.source) end
|
||||
elseif line.type == "checkpoint" then
|
||||
local reached, reachede = get_variable(state, line.namespace.."🏁")
|
||||
if not reached then return nil, reachede end
|
||||
|
|
@ -161,12 +248,8 @@ run_block = function(state, block, resume_from_there, i, j)
|
|||
local line = block[i]
|
||||
local skip = false
|
||||
-- skip current choice block if enabled
|
||||
if state.interpreter.skip_choices_until_flush then
|
||||
if line.type == "choice" then
|
||||
skip = true
|
||||
elseif line.type == "flush_events" or (line.push_event and line.push_event ~= "choice") then
|
||||
state.interpreter.skip_choices_until_flush = nil
|
||||
end
|
||||
if state.interpreter.skip_choices_until_flush and line.type == "choice" then
|
||||
skip = true
|
||||
end
|
||||
-- run line
|
||||
if not skip then
|
||||
|
|
@ -253,7 +336,7 @@ local function run(state, block, resume_from_there, i, j)
|
|||
-- run
|
||||
local v, e = run_block(state, block, resume_from_there, i, j)
|
||||
-- return to previous tag state
|
||||
-- tag stack pop when resuming is done when exiting the tag block
|
||||
-- when resuming is done, tag stack pop when exiting the tag block
|
||||
-- stray elements may be left on the stack if there is a return before we exit all the tag block, so we trim them
|
||||
if resume_from_there then
|
||||
tags:trim(state, tags_len)
|
||||
|
|
@ -280,7 +363,7 @@ local interpreter = {
|
|||
package.loaded[...] = interpreter
|
||||
eval = require((...):gsub("interpreter$", "expression"))
|
||||
local common = require((...):gsub("interpreter$", "common"))
|
||||
truthy, merge_state, to_lua, eval_text, get_variable = common.truthy, common.merge_state, common.to_lua, common.eval_text, common.get_variable
|
||||
truthy, merge_state, to_lua, get_variable, eval_text_callback = common.truthy, common.merge_state, common.to_lua, common.get_variable, common.eval_text_callback
|
||||
escape = require((...):gsub("interpreter%.interpreter$", "parser.common")).escape
|
||||
|
||||
return interpreter
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ local function parse_line(line, state, namespace)
|
|||
-- choice
|
||||
elseif l:match("^>") then
|
||||
r.type = "choice"
|
||||
r.push_event = "choice"
|
||||
r.child = true
|
||||
r.text = l:match("^>%s*(.-)$")
|
||||
-- function & checkpoint
|
||||
|
|
@ -271,7 +270,6 @@ local function parse_line(line, state, namespace)
|
|||
-- text
|
||||
elseif l:match("[^%s]") then
|
||||
r.type = "text"
|
||||
r.push_event = "text"
|
||||
r.text = l
|
||||
-- flush events
|
||||
else
|
||||
|
|
|
|||
75
test/run.lua
75
test/run.lua
|
|
@ -3,24 +3,38 @@ local anselme = require("anselme")
|
|||
local ser = require("test.ser")
|
||||
local inspect = require("test.inspect")
|
||||
|
||||
local function format_text(t, prefix)
|
||||
prefix = prefix or " "
|
||||
local function format_text(t)
|
||||
local r = ""
|
||||
for _, l in ipairs(t) do
|
||||
r = r .. prefix
|
||||
-- format tags display
|
||||
local tags = ""
|
||||
for k, v in pairs(l.tags) do
|
||||
tags = tags .. ("[%q]=%q"):format(k, v)
|
||||
end
|
||||
-- build text
|
||||
if tags ~= "" then
|
||||
r = r .. ("[%s]%s"):format(tags, l.data)
|
||||
r = r .. ("[%s]%s"):format(tags, l.text)
|
||||
else
|
||||
r = r .. l.data
|
||||
r = r .. l.text
|
||||
end
|
||||
end
|
||||
return r
|
||||
end
|
||||
|
||||
--- remove unneeded things from a result table (namely private fields)
|
||||
local function strip(t, visited)
|
||||
visited = visited or {}
|
||||
for k, v in pairs(t) do
|
||||
if type(k) == "string" and k:match("^_") then
|
||||
t[k] = nil
|
||||
end
|
||||
if type(v) == "table" and not visited[v] then
|
||||
visited[v] = true
|
||||
strip(v, visited)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function compare(a, b)
|
||||
if type(a) == "table" and type(b) == "table" then
|
||||
for k, v in pairs(a) do
|
||||
|
|
@ -63,14 +77,25 @@ while i <= #arg do
|
|||
end
|
||||
end
|
||||
|
||||
-- list tests
|
||||
local files = {}
|
||||
for item in lfs.dir("test/tests/") do
|
||||
if item:match("%.ans$") and item:match(args.filter or "") then
|
||||
table.insert(files, "test/tests/"..item)
|
||||
end
|
||||
if args.help then
|
||||
print("Anselme test runner. Usage:")
|
||||
print(" no arguments: perform included test suite")
|
||||
print(" --script filename: test a script interactively")
|
||||
print(" --game directory: test a game interactively")
|
||||
print(" --help: display this message")
|
||||
print("")
|
||||
print("For test suite mode:")
|
||||
print(" --filter pattern: only perform tests matching pattern")
|
||||
print(" --write-all: rewrite all expected test results with current output")
|
||||
print(" --write-new: write expected test results with current output for test that do not already have a saved expected output")
|
||||
print(" --write-error: rewrite expected test results with current output for test with invalid output")
|
||||
print(" --silent: silent output")
|
||||
print("")
|
||||
print("For script or game mode:")
|
||||
print(" --lang code: load a language file")
|
||||
print(" --save: print VM state at the end of the script")
|
||||
os.exit()
|
||||
end
|
||||
table.sort(files)
|
||||
|
||||
-- test script
|
||||
if args.script or args.game then
|
||||
|
|
@ -99,7 +124,9 @@ if args.script or args.game then
|
|||
if t == "text" then
|
||||
print(format_text(d))
|
||||
elseif t == "choice" then
|
||||
print(format_text(d, "\n> "))
|
||||
for j, choice in ipairs(d) do
|
||||
print(j.."> "..format_text(choice))
|
||||
end
|
||||
istate:choose(io.read())
|
||||
elseif t == "error" then
|
||||
print(t, d)
|
||||
|
|
@ -114,8 +141,19 @@ if args.script or args.game then
|
|||
if args.save then
|
||||
print(inspect(vm:save()))
|
||||
end
|
||||
-- run tests
|
||||
|
||||
-- test mode
|
||||
else
|
||||
-- list tests
|
||||
local files = {}
|
||||
for item in lfs.dir("test/tests/") do
|
||||
if item:match("%.ans$") and item:match(args.filter or "") then
|
||||
table.insert(files, "test/tests/"..item)
|
||||
end
|
||||
end
|
||||
table.sort(files)
|
||||
|
||||
-- run tests
|
||||
local total, success = #files, 0
|
||||
for _, file in ipairs(files) do
|
||||
local filebase = file:match("^(.*)%.ans$")
|
||||
|
|
@ -176,6 +214,8 @@ else
|
|||
table.insert(result, { "error", err })
|
||||
end
|
||||
|
||||
strip(result)
|
||||
|
||||
if args["write-all"] then
|
||||
write_result(filebase, result)
|
||||
else
|
||||
|
|
@ -190,6 +230,11 @@ else
|
|||
print(inspect(output))
|
||||
print("")
|
||||
end
|
||||
if args["write-error"] then
|
||||
write_result(filebase, result)
|
||||
print("Rewritten result file for "..filebase)
|
||||
success = success + 1
|
||||
end
|
||||
else
|
||||
success = success + 1
|
||||
end
|
||||
|
|
@ -208,7 +253,7 @@ else
|
|||
end
|
||||
end
|
||||
end
|
||||
if args.write then
|
||||
if args["write-all"] then
|
||||
print("Wrote test results.")
|
||||
else
|
||||
print(("%s/%s tests success."):format(success, total))
|
||||
|
|
|
|||
|
|
@ -1,14 +1,22 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="bibi = bibi",tags=_[5]}
|
||||
_[3]={_[4]}
|
||||
_[7]={}
|
||||
_[6]={tags=_[7],text="bibi"}
|
||||
_[5]={tags=_[7],text=" = "}
|
||||
_[4]={tags=_[7],text="bibi"}
|
||||
_[3]={_[4],_[5],_[6]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "bibi = bibi",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "bibi"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " = "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "bibi"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -2,9 +2,9 @@ local _={}
|
|||
_[13]={}
|
||||
_[12]={}
|
||||
_[11]={}
|
||||
_[10]={data="generic minus",tags=_[13]}
|
||||
_[9]={data="heh minus lol",tags=_[12]}
|
||||
_[8]={data="-3",tags=_[11]}
|
||||
_[10]={tags=_[13],text="generic minus"}
|
||||
_[9]={tags=_[12],text="heh minus lol"}
|
||||
_[8]={tags=_[11],text="-3"}
|
||||
_[7]={_[10]}
|
||||
_[6]={_[9]}
|
||||
_[5]={_[8]}
|
||||
|
|
@ -15,16 +15,16 @@ _[1]={"text",_[5]}
|
|||
return {_[1],_[2],_[3],_[4]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "-3",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "-3"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "heh minus lol",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "heh minus lol"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "generic minus",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "generic minus"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
33
test/tests/checkpoint change.ans
Normal file
33
test/tests/checkpoint change.ans
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
$ f
|
||||
x
|
||||
§ p
|
||||
a
|
||||
|
||||
§ q
|
||||
b
|
||||
|
||||
c
|
||||
|
||||
d
|
||||
|
||||
From start:
|
||||
~ f
|
||||
|
||||
From p checkpoint:
|
||||
~ f
|
||||
|
||||
From q checkpoint:
|
||||
~ f
|
||||
|
||||
From q checkpoint again:
|
||||
~ f
|
||||
|
||||
Force p checkpoint:
|
||||
~ f.p()
|
||||
|
||||
From q again:
|
||||
~ f
|
||||
|
||||
Go to p again by setting checkpoint manually:
|
||||
~ f.checkpoint := "p"
|
||||
~ f
|
||||
193
test/tests/checkpoint change.lua
Normal file
193
test/tests/checkpoint change.lua
Normal file
|
|
@ -0,0 +1,193 @@
|
|||
local _={}
|
||||
_[91]={}
|
||||
_[90]={}
|
||||
_[89]={}
|
||||
_[88]={}
|
||||
_[87]={}
|
||||
_[86]={}
|
||||
_[85]={}
|
||||
_[84]={}
|
||||
_[83]={}
|
||||
_[82]={}
|
||||
_[81]={}
|
||||
_[80]={}
|
||||
_[79]={}
|
||||
_[78]={}
|
||||
_[77]={}
|
||||
_[76]={}
|
||||
_[75]={}
|
||||
_[74]={}
|
||||
_[73]={}
|
||||
_[72]={}
|
||||
_[71]={}
|
||||
_[70]={}
|
||||
_[69]={}
|
||||
_[68]={}
|
||||
_[67]={}
|
||||
_[66]={}
|
||||
_[65]={tags=_[91],text="d"}
|
||||
_[64]={tags=_[90],text="c"}
|
||||
_[63]={tags=_[89],text="a"}
|
||||
_[62]={tags=_[88],text="Go to p again by setting checkpoint manually:"}
|
||||
_[61]={tags=_[87],text="d"}
|
||||
_[60]={tags=_[86],text="c"}
|
||||
_[59]={tags=_[85],text="b"}
|
||||
_[58]={tags=_[84],text="From q again:"}
|
||||
_[57]={tags=_[83],text="c"}
|
||||
_[56]={tags=_[82],text="a"}
|
||||
_[55]={tags=_[81],text="Force p checkpoint:"}
|
||||
_[54]={tags=_[80],text="d"}
|
||||
_[53]={tags=_[79],text="c"}
|
||||
_[52]={tags=_[78],text="b"}
|
||||
_[51]={tags=_[77],text="From q checkpoint again:"}
|
||||
_[50]={tags=_[76],text="d"}
|
||||
_[49]={tags=_[75],text="c"}
|
||||
_[48]={tags=_[74],text="b"}
|
||||
_[47]={tags=_[73],text="From q checkpoint:"}
|
||||
_[46]={tags=_[72],text="d"}
|
||||
_[45]={tags=_[71],text="c"}
|
||||
_[44]={tags=_[70],text="a"}
|
||||
_[43]={tags=_[69],text="From p checkpoint:"}
|
||||
_[42]={tags=_[68],text="d"}
|
||||
_[41]={tags=_[67],text="x"}
|
||||
_[40]={tags=_[66],text="From start:"}
|
||||
_[39]={_[65]}
|
||||
_[38]={_[64]}
|
||||
_[37]={_[62],_[63]}
|
||||
_[36]={_[61]}
|
||||
_[35]={_[60]}
|
||||
_[34]={_[58],_[59]}
|
||||
_[33]={_[57]}
|
||||
_[32]={_[55],_[56]}
|
||||
_[31]={_[54]}
|
||||
_[30]={_[53]}
|
||||
_[29]={_[51],_[52]}
|
||||
_[28]={_[50]}
|
||||
_[27]={_[49]}
|
||||
_[26]={_[47],_[48]}
|
||||
_[25]={_[46]}
|
||||
_[24]={_[45]}
|
||||
_[23]={_[43],_[44]}
|
||||
_[22]={_[42]}
|
||||
_[21]={_[40],_[41]}
|
||||
_[20]={"return"}
|
||||
_[19]={"text",_[39]}
|
||||
_[18]={"text",_[38]}
|
||||
_[17]={"text",_[37]}
|
||||
_[16]={"text",_[36]}
|
||||
_[15]={"text",_[35]}
|
||||
_[14]={"text",_[34]}
|
||||
_[13]={"text",_[33]}
|
||||
_[12]={"text",_[32]}
|
||||
_[11]={"text",_[31]}
|
||||
_[10]={"text",_[30]}
|
||||
_[9]={"text",_[29]}
|
||||
_[8]={"text",_[28]}
|
||||
_[7]={"text",_[27]}
|
||||
_[6]={"text",_[26]}
|
||||
_[5]={"text",_[25]}
|
||||
_[4]={"text",_[24]}
|
||||
_[3]={"text",_[23]}
|
||||
_[2]={"text",_[22]}
|
||||
_[1]={"text",_[21]}
|
||||
return {_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9],_[10],_[11],_[12],_[13],_[14],_[15],_[16],_[17],_[18],_[19],_[20]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "From start:"
|
||||
}, {
|
||||
tags = {},
|
||||
text = "x"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "d"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "From p checkpoint:"
|
||||
}, {
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "d"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "From q checkpoint:"
|
||||
}, {
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "d"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "From q checkpoint again:"
|
||||
}, {
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "d"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "Force p checkpoint:"
|
||||
}, {
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "From q again:"
|
||||
}, {
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "d"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "Go to p again by setting checkpoint manually:"
|
||||
}, {
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "d"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,19 +1,23 @@
|
|||
local _={}
|
||||
_[25]={}
|
||||
_[24]={}
|
||||
_[23]={}
|
||||
_[22]={}
|
||||
_[21]={}
|
||||
_[20]={}
|
||||
_[19]={}
|
||||
_[18]={}
|
||||
_[17]={}
|
||||
_[16]={data="Reached: 2",tags=_[21]}
|
||||
_[15]={data="Seen: 1",tags=_[20]}
|
||||
_[14]={data="seen!",tags=_[19]}
|
||||
_[13]={data="Reached: 1",tags=_[18]}
|
||||
_[12]={data="Seen: 0",tags=_[17]}
|
||||
_[11]={_[16]}
|
||||
_[10]={_[15]}
|
||||
_[9]={_[14]}
|
||||
_[8]={_[13]}
|
||||
_[7]={_[12]}
|
||||
_[20]={tags=_[25],text="2"}
|
||||
_[19]={tags=_[25],text="Reached: "}
|
||||
_[18]={tags=_[24],text="1"}
|
||||
_[17]={tags=_[24],text="Seen: "}
|
||||
_[16]={tags=_[23],text="seen!"}
|
||||
_[15]={tags=_[22],text="1"}
|
||||
_[14]={tags=_[22],text="Reached: "}
|
||||
_[13]={tags=_[21],text="0"}
|
||||
_[12]={tags=_[21],text="Seen: "}
|
||||
_[11]={_[19],_[20]}
|
||||
_[10]={_[17],_[18]}
|
||||
_[9]={_[16]}
|
||||
_[8]={_[14],_[15]}
|
||||
_[7]={_[12],_[13]}
|
||||
_[6]={"return"}
|
||||
_[5]={"text",_[11]}
|
||||
_[4]={"text",_[10]}
|
||||
|
|
@ -23,24 +27,36 @@ _[1]={"text",_[7]}
|
|||
return {_[1],_[2],_[3],_[4],_[5],_[6]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "Seen: 0",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "Seen: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "0"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "Reached: 1",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "Reached: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "1"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "seen!",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "seen!"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "Seen: 1",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "Seen: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "1"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "Reached: 2",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "Reached: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "2"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,16 +1,18 @@
|
|||
local _={}
|
||||
_[23]={}
|
||||
_[22]={}
|
||||
_[21]={}
|
||||
_[20]={}
|
||||
_[19]={}
|
||||
_[20]={tags=_[23],text="oh"}
|
||||
_[19]={tags=_[21],text="ho"}
|
||||
_[18]={}
|
||||
_[17]={}
|
||||
_[16]={}
|
||||
_[15]={data="plop",tags=_[21]}
|
||||
_[14]={data="oh",tags=_[20]}
|
||||
_[13]={data="ho",tags=_[19]}
|
||||
_[12]={data="ok",tags=_[18]}
|
||||
_[11]={data="ne",tags=_[17]}
|
||||
_[10]={data="ye",tags=_[16]}
|
||||
_[17]={tags=_[18],text="ne"}
|
||||
_[16]={tags=_[22],text="ye"}
|
||||
_[15]={tags=_[21],text="plop"}
|
||||
_[14]={_[20]}
|
||||
_[13]={_[19]}
|
||||
_[12]={tags=_[18],text="ok"}
|
||||
_[11]={_[17]}
|
||||
_[10]={_[16]}
|
||||
_[9]={_[15]}
|
||||
_[8]={_[13],_[14]}
|
||||
_[7]={_[12]}
|
||||
|
|
@ -22,27 +24,27 @@ _[2]={"text",_[7]}
|
|||
_[1]={"choice",_[6]}
|
||||
return {_[1],_[2],_[3],_[4],_[5]}
|
||||
--[[
|
||||
{ "choice", { {
|
||||
data = "ye",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "ne",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "ye"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "ne"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { {
|
||||
data = "ho",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "oh",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "ho"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "oh"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
data = "plop",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "plop"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,17 @@
|
|||
local _={}
|
||||
_[18]={}
|
||||
_[17]={}
|
||||
_[16]={}
|
||||
_[15]={}
|
||||
_[14]={}
|
||||
_[13]={}
|
||||
_[12]={}
|
||||
_[11]={}
|
||||
_[10]={data="ok",tags=_[15]}
|
||||
_[9]={data="neol",tags=_[14]}
|
||||
_[8]={data="oh",tags=_[13]}
|
||||
_[7]={data="neol",tags=_[12]}
|
||||
_[6]={data="ho",tags=_[11]}
|
||||
_[14]={tags=_[18],text="neol"}
|
||||
_[13]={tags=_[15],text="oh"}
|
||||
_[12]={tags=_[17],text="neol"}
|
||||
_[11]={tags=_[16],text="ho"}
|
||||
_[10]={tags=_[15],text="ok"}
|
||||
_[9]={_[14]}
|
||||
_[8]={_[13]}
|
||||
_[7]={_[12]}
|
||||
_[6]={_[11]}
|
||||
_[5]={_[10]}
|
||||
_[4]={_[6],_[7],_[8],_[9]}
|
||||
_[3]={"return"}
|
||||
|
|
@ -16,22 +19,22 @@ _[2]={"text",_[5]}
|
|||
_[1]={"choice",_[4]}
|
||||
return {_[1],_[2],_[3]}
|
||||
--[[
|
||||
{ "choice", { {
|
||||
data = "ho",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "neol",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "oh",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "neol",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "ho"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "neol"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "oh"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "neol"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
10
test/tests/choice line interpolation with choice event.ans
Normal file
10
test/tests/choice line interpolation with choice event.ans
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
~ choose(1)
|
||||
> Press {jump button} to jump.
|
||||
ok
|
||||
> No
|
||||
ko
|
||||
|
||||
$ jump button
|
||||
A # 1
|
||||
> Suprise choice!
|
||||
@"JOIN"
|
||||
47
test/tests/choice line interpolation with choice event.lua
Normal file
47
test/tests/choice line interpolation with choice event.lua
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
local _={}
|
||||
_[19]={}
|
||||
_[18]={}
|
||||
_[17]={1}
|
||||
_[16]={}
|
||||
_[15]={text="No",tags=_[19]}
|
||||
_[14]={text=" to jump.",tags=_[16]}
|
||||
_[13]={text="JOIN",tags=_[16]}
|
||||
_[12]={text="Suprise choice!",tags=_[18]}
|
||||
_[11]={text="A",tags=_[17]}
|
||||
_[10]={text="Press ",tags=_[16]}
|
||||
_[9]={text="ok",tags=_[16]}
|
||||
_[8]={_[15]}
|
||||
_[7]={_[12],_[13],_[14]}
|
||||
_[6]={_[10],_[11]}
|
||||
_[5]={_[9]}
|
||||
_[4]={_[6],_[7],_[8]}
|
||||
_[3]={"return"}
|
||||
_[2]={"text",_[5]}
|
||||
_[1]={"choice",_[4]}
|
||||
return {_[1],_[2],_[3]}
|
||||
--[[
|
||||
{ "choice", { { {
|
||||
tags = <1>{},
|
||||
text = "Press "
|
||||
}, {
|
||||
tags = { 1 },
|
||||
text = "A"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "Suprise choice!"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "JOIN"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " to jump."
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "No"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
11
test/tests/choice line interpolation with event flush.ans
Normal file
11
test/tests/choice line interpolation with event flush.ans
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
~ choose(1)
|
||||
> Press {jump button} to jump.
|
||||
ok
|
||||
~ choose(1)
|
||||
> No
|
||||
ko
|
||||
|
||||
$ jump button
|
||||
A # 1
|
||||
|
||||
@"SPLIT"
|
||||
55
test/tests/choice line interpolation with event flush.lua
Normal file
55
test/tests/choice line interpolation with event flush.lua
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
local _={}
|
||||
_[22]={}
|
||||
_[21]={1}
|
||||
_[20]={tags=_[22],text="No"}
|
||||
_[19]={text=" to jump."}
|
||||
_[18]={text="SPLIT"}
|
||||
_[17]={}
|
||||
_[16]={tags=_[21],text="A"}
|
||||
_[15]={tags=_[17],text="Press "}
|
||||
_[14]={tags=_[17],text="ok"}
|
||||
_[13]={_[20]}
|
||||
_[12]={_[18],_[19]}
|
||||
_[11]={tags=_[17],text="ok"}
|
||||
_[10]={_[15],_[16]}
|
||||
_[9]={_[14]}
|
||||
_[8]={_[12],_[13]}
|
||||
_[7]={_[11]}
|
||||
_[6]={_[10]}
|
||||
_[5]={"return"}
|
||||
_[4]={"text",_[9]}
|
||||
_[3]={"choice",_[8]}
|
||||
_[2]={"text",_[7]}
|
||||
_[1]={"choice",_[6]}
|
||||
_[0]={_[1],_[2],_[3],_[4],_[5]}
|
||||
_[18].tags=_[17]
|
||||
_[19].tags=_[17]
|
||||
return _[0]
|
||||
--[[
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "Press "
|
||||
}, {
|
||||
tags = { 1 },
|
||||
text = "A"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = <1>{},
|
||||
text = "SPLIT"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " to jump."
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "No"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
18
test/tests/choice line interpolation with text event.ans
Normal file
18
test/tests/choice line interpolation with text event.ans
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
> Press {jump button} to jump.
|
||||
ok
|
||||
> No
|
||||
ko
|
||||
~ choose(1)
|
||||
|
||||
$ jump button
|
||||
A # 1
|
||||
|
||||
> Other
|
||||
ko
|
||||
> Use {move axis} to move.
|
||||
ok
|
||||
~ choose(2)
|
||||
|
||||
$ move axis
|
||||
left # 1
|
||||
@" joystick"
|
||||
72
test/tests/choice line interpolation with text event.lua
Normal file
72
test/tests/choice line interpolation with text event.lua
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
local _={}
|
||||
_[30]={1}
|
||||
_[29]={}
|
||||
_[28]={}
|
||||
_[27]={1}
|
||||
_[26]={}
|
||||
_[25]={tags=_[26],text=" to move."}
|
||||
_[24]={tags=_[26],text=" joystick"}
|
||||
_[23]={tags=_[30],text="left"}
|
||||
_[22]={tags=_[26],text="Use "}
|
||||
_[21]={tags=_[29],text="Other"}
|
||||
_[20]={}
|
||||
_[19]={tags=_[28],text="No"}
|
||||
_[18]={tags=_[20],text=" to jump."}
|
||||
_[17]={tags=_[27],text="A"}
|
||||
_[16]={tags=_[20],text="Press "}
|
||||
_[15]={tags=_[26],text="ok"}
|
||||
_[14]={_[22],_[23],_[24],_[25]}
|
||||
_[13]={_[21]}
|
||||
_[12]={tags=_[20],text="ok"}
|
||||
_[11]={_[19]}
|
||||
_[10]={_[16],_[17],_[18]}
|
||||
_[9]={_[15]}
|
||||
_[8]={_[13],_[14]}
|
||||
_[7]={_[12]}
|
||||
_[6]={_[10],_[11]}
|
||||
_[5]={"return"}
|
||||
_[4]={"text",_[9]}
|
||||
_[3]={"choice",_[8]}
|
||||
_[2]={"text",_[7]}
|
||||
_[1]={"choice",_[6]}
|
||||
return {_[1],_[2],_[3],_[4],_[5]}
|
||||
--[[
|
||||
{ "choice", { { {
|
||||
tags = <1>{},
|
||||
text = "Press "
|
||||
}, {
|
||||
tags = { 1 },
|
||||
text = "A"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " to jump."
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "No"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "Other"
|
||||
} }, { {
|
||||
tags = <1>{},
|
||||
text = "Use "
|
||||
}, {
|
||||
tags = { 1 },
|
||||
text = "left"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " joystick"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " to move."
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,17 +1,21 @@
|
|||
local _={}
|
||||
_[26]={}
|
||||
_[25]={k="v"}
|
||||
_[24]={42,k="v"}
|
||||
_[23]={}
|
||||
_[22]={42}
|
||||
_[21]={data="f",tags=_[26]}
|
||||
_[20]={data="e",tags=_[25]}
|
||||
_[19]={data="b",tags=_[24]}
|
||||
_[18]={data="d",tags=_[25]}
|
||||
_[17]={data="a",tags=_[24]}
|
||||
_[16]={data="b",tags=_[22]}
|
||||
_[15]={data="c",tags=_[23]}
|
||||
_[14]={data="a",tags=_[22]}
|
||||
_[30]={}
|
||||
_[29]={}
|
||||
_[28]={k="v"}
|
||||
_[27]={42,k="v"}
|
||||
_[26]={tags=_[28],text="d"}
|
||||
_[25]={tags=_[27],text="a"}
|
||||
_[24]={42}
|
||||
_[23]={tags=_[30],text="c"}
|
||||
_[22]={tags=_[24],text="a"}
|
||||
_[21]={tags=_[29],text="f"}
|
||||
_[20]={tags=_[28],text="e"}
|
||||
_[19]={tags=_[27],text="b"}
|
||||
_[18]={_[26]}
|
||||
_[17]={_[25]}
|
||||
_[16]={tags=_[24],text="b"}
|
||||
_[15]={_[23]}
|
||||
_[14]={_[22]}
|
||||
_[13]={_[21]}
|
||||
_[12]={_[20]}
|
||||
_[11]={_[19]}
|
||||
|
|
@ -27,43 +31,43 @@ _[2]={"text",_[9]}
|
|||
_[1]={"choice",_[8]}
|
||||
return {_[1],_[2],_[3],_[4],_[5],_[6],_[7]}
|
||||
--[[
|
||||
{ "choice", { {
|
||||
data = "a",
|
||||
tags = { 42 }
|
||||
}, {
|
||||
data = "c",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = { 42 },
|
||||
text = "a"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
data = "b",
|
||||
tags = { 42 }
|
||||
tags = { 42 },
|
||||
text = "b"
|
||||
} } }
|
||||
{ "choice", { {
|
||||
data = "a",
|
||||
{ "choice", { { {
|
||||
tags = { 42,
|
||||
k = "v"
|
||||
},
|
||||
text = "a"
|
||||
} }, { {
|
||||
tags = {
|
||||
k = "v"
|
||||
},
|
||||
text = "d"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = { 42,
|
||||
k = "v"
|
||||
}
|
||||
}, {
|
||||
data = "d",
|
||||
},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {
|
||||
k = "v"
|
||||
}
|
||||
},
|
||||
text = "e"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "b",
|
||||
tags = { 42,
|
||||
k = "v"
|
||||
}
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "e",
|
||||
tags = {
|
||||
k = "v"
|
||||
}
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "f",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "f"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
local _={}
|
||||
_[12]={}
|
||||
_[11]={}
|
||||
_[10]={}
|
||||
_[9]={}
|
||||
_[8]={data="ok",tags=_[11]}
|
||||
_[7]={data="ne",tags=_[10]}
|
||||
_[6]={data="ye",tags=_[9]}
|
||||
_[10]={tags=_[11],text="ne"}
|
||||
_[9]={tags=_[12],text="ye"}
|
||||
_[8]={tags=_[11],text="ok"}
|
||||
_[7]={_[10]}
|
||||
_[6]={_[9]}
|
||||
_[5]={_[8]}
|
||||
_[4]={_[6],_[7]}
|
||||
_[3]={"return"}
|
||||
|
|
@ -12,16 +13,16 @@ _[2]={"text",_[5]}
|
|||
_[1]={"choice",_[4]}
|
||||
return {_[1],_[2],_[3]}
|
||||
--[[
|
||||
{ "choice", { {
|
||||
data = "ye",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "ne",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "ye"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "ne"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,16 +1,20 @@
|
|||
local _={}
|
||||
_[17]={}
|
||||
_[16]={}
|
||||
_[15]={}
|
||||
_[14]={}
|
||||
_[13]={data="parallel: 2",tags=_[17]}
|
||||
_[12]={data="after: 2",tags=_[16]}
|
||||
_[11]={data="parallel: 5",tags=_[15]}
|
||||
_[10]={data="before: 2",tags=_[14]}
|
||||
_[9]={_[13]}
|
||||
_[8]={_[12]}
|
||||
_[7]={_[11]}
|
||||
_[6]={_[10]}
|
||||
_[21]={}
|
||||
_[20]={}
|
||||
_[19]={}
|
||||
_[18]={}
|
||||
_[17]={tags=_[21],text="2"}
|
||||
_[16]={tags=_[21],text="parallel: "}
|
||||
_[15]={tags=_[20],text="2"}
|
||||
_[14]={tags=_[20],text="after: "}
|
||||
_[13]={tags=_[19],text="5"}
|
||||
_[12]={tags=_[19],text="parallel: "}
|
||||
_[11]={tags=_[18],text="2"}
|
||||
_[10]={tags=_[18],text="before: "}
|
||||
_[9]={_[16],_[17]}
|
||||
_[8]={_[14],_[15]}
|
||||
_[7]={_[12],_[13]}
|
||||
_[6]={_[10],_[11]}
|
||||
_[5]={"return"}
|
||||
_[4]={"text",_[9]}
|
||||
_[3]={"text",_[8]}
|
||||
|
|
@ -19,20 +23,32 @@ _[1]={"text",_[6]}
|
|||
return {_[1],_[2],_[3],_[4],_[5]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "before: 2",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "before: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "2"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "parallel: 5",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "parallel: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "5"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "after: 2",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "after: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "2"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "parallel: 2",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "parallel: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "2"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
local _={}
|
||||
_[7]={}
|
||||
_[6]={}
|
||||
_[5]={data="ok bis",tags=_[7]}
|
||||
_[4]={data="ok",tags=_[6]}
|
||||
_[5]={tags=_[7],text="ok bis"}
|
||||
_[4]={tags=_[6],text="ok"}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ok"
|
||||
}, {
|
||||
data = "ok bis",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ok bis"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="ok",tags=_[5]}
|
||||
_[4]={tags=_[5],text="ok"}
|
||||
_[3]={_[4]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="ok",tags=_[5]}
|
||||
_[4]={tags=_[5],text="ok"}
|
||||
_[3]={_[4]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="ok",tags=_[5]}
|
||||
_[4]={tags=_[5],text="ok"}
|
||||
_[3]={_[4]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="ok",tags=_[5]}
|
||||
_[4]={tags=_[5],text="ok"}
|
||||
_[3]={_[4]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="ok",tags=_[5]}
|
||||
_[4]={tags=_[5],text="ok"}
|
||||
_[3]={_[4]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
local _={}
|
||||
_[8]={}
|
||||
_[7]={}
|
||||
_[6]={data="ho",tags=_[8]}
|
||||
_[5]={data="ah",tags=_[7]}
|
||||
_[6]={tags=_[8],text="ho"}
|
||||
_[5]={tags=_[7],text="ah"}
|
||||
_[4]={_[5],_[6]}
|
||||
_[3]={"return"}
|
||||
_[2]={"text",_[4]}
|
||||
|
|
@ -11,11 +11,11 @@ return {_[1],_[2],_[3]}
|
|||
--[[
|
||||
{ "wait", 5 }
|
||||
{ "text", { {
|
||||
data = "ah",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ah"
|
||||
}, {
|
||||
data = "ho",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ho"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="Name: Darmanin\nAge: 38",tags=_[5]}
|
||||
_[4]={tags=_[5],text="Name: Darmanin\nAge: 38"}
|
||||
_[3]={_[4]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "Name: Darmanin\nAge: 38",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "Name: Darmanin\nAge: 38"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,28 +1,36 @@
|
|||
local _={}
|
||||
_[33]={}
|
||||
_[32]={}
|
||||
_[31]={}
|
||||
_[30]={}
|
||||
_[29]={}
|
||||
_[28]={}
|
||||
_[27]={}
|
||||
_[26]={}
|
||||
_[25]={data="1 = 1",tags=_[33]}
|
||||
_[24]={data="0 = 0",tags=_[32]}
|
||||
_[23]={data="0 = 0",tags=_[31]}
|
||||
_[22]={data="0 = 0",tags=_[30]}
|
||||
_[21]={data="0 = 0",tags=_[29]}
|
||||
_[20]={data="1 = 1",tags=_[28]}
|
||||
_[19]={data="0 = 0",tags=_[27]}
|
||||
_[18]={data="0 = 0",tags=_[26]}
|
||||
_[17]={_[25]}
|
||||
_[16]={_[24]}
|
||||
_[15]={_[23]}
|
||||
_[14]={_[22]}
|
||||
_[13]={_[21]}
|
||||
_[12]={_[20]}
|
||||
_[11]={_[19]}
|
||||
_[10]={_[18]}
|
||||
_[41]={}
|
||||
_[40]={}
|
||||
_[39]={}
|
||||
_[38]={}
|
||||
_[37]={}
|
||||
_[36]={}
|
||||
_[35]={}
|
||||
_[34]={}
|
||||
_[33]={tags=_[41],text="1"}
|
||||
_[32]={tags=_[41],text="1 = "}
|
||||
_[31]={tags=_[40],text="0"}
|
||||
_[30]={tags=_[40],text="0 = "}
|
||||
_[29]={tags=_[39],text="0"}
|
||||
_[28]={tags=_[39],text="0 = "}
|
||||
_[27]={tags=_[38],text="0"}
|
||||
_[26]={tags=_[38],text="0 = "}
|
||||
_[25]={tags=_[37],text="0"}
|
||||
_[24]={tags=_[37],text="0 = "}
|
||||
_[23]={tags=_[36],text="1"}
|
||||
_[22]={tags=_[36],text="1 = "}
|
||||
_[21]={tags=_[35],text="0"}
|
||||
_[20]={tags=_[35],text="0 = "}
|
||||
_[19]={tags=_[34],text="0"}
|
||||
_[18]={tags=_[34],text="0 = "}
|
||||
_[17]={_[32],_[33]}
|
||||
_[16]={_[30],_[31]}
|
||||
_[15]={_[28],_[29]}
|
||||
_[14]={_[26],_[27]}
|
||||
_[13]={_[24],_[25]}
|
||||
_[12]={_[22],_[23]}
|
||||
_[11]={_[20],_[21]}
|
||||
_[10]={_[18],_[19]}
|
||||
_[9]={"return"}
|
||||
_[8]={"text",_[17]}
|
||||
_[7]={"text",_[16]}
|
||||
|
|
@ -35,36 +43,60 @@ _[1]={"text",_[10]}
|
|||
return {_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "0 = 0",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "0 = "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "0"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "0 = 0",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "0 = "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "0"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "1 = 1",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "1 = "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "1"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "0 = 0",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "0 = "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "0"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "0 = 0",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "0 = "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "0"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "0 = 0",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "0 = "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "0"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "0 = 0",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "0 = "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "0"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "1 = 1",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "1 = "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "1"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,12 +1,14 @@
|
|||
local _={}
|
||||
_[17]={}
|
||||
_[19]={}
|
||||
_[18]={}
|
||||
_[17]={tags=_[19],text="d"}
|
||||
_[16]={}
|
||||
_[15]={}
|
||||
_[15]={tags=_[18],text="b"}
|
||||
_[14]={}
|
||||
_[13]={data="d",tags=_[17]}
|
||||
_[12]={data="c",tags=_[16]}
|
||||
_[11]={data="b",tags=_[15]}
|
||||
_[10]={data="a",tags=_[14]}
|
||||
_[13]={_[17]}
|
||||
_[12]={tags=_[16],text="c"}
|
||||
_[11]={_[15]}
|
||||
_[10]={tags=_[14],text="a"}
|
||||
_[9]={_[13]}
|
||||
_[8]={_[12]}
|
||||
_[7]={_[11]}
|
||||
|
|
@ -19,20 +21,20 @@ _[1]={"text",_[6]}
|
|||
return {_[1],_[2],_[3],_[4],_[5]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
data = "c",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { {
|
||||
data = "d",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "d"
|
||||
} } } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,22 +1,38 @@
|
|||
local _={}
|
||||
_[9]={}
|
||||
_[8]={}
|
||||
_[7]={data="ye = ye",tags=_[9]}
|
||||
_[6]={data="ok = ok",tags=_[8]}
|
||||
_[5]={_[7]}
|
||||
_[4]={_[6]}
|
||||
_[13]={}
|
||||
_[12]={}
|
||||
_[11]={tags=_[13],text="ye"}
|
||||
_[10]={tags=_[13],text=" = "}
|
||||
_[9]={tags=_[13],text="ye"}
|
||||
_[8]={tags=_[12],text="ok"}
|
||||
_[7]={tags=_[12],text=" = "}
|
||||
_[6]={tags=_[12],text="ok"}
|
||||
_[5]={_[9],_[10],_[11]}
|
||||
_[4]={_[6],_[7],_[8]}
|
||||
_[3]={"return"}
|
||||
_[2]={"text",_[5]}
|
||||
_[1]={"text",_[4]}
|
||||
return {_[1],_[2],_[3]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "ok = ok",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "ok"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " = "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "ye = ye",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "ye"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " = "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "ye"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
local _={}
|
||||
_[7]={}
|
||||
_[6]={}
|
||||
_[5]={data="[o, k]",tags=_[7]}
|
||||
_[4]={data="ok",tags=_[6]}
|
||||
_[5]={tags=_[7],text="[o, k]"}
|
||||
_[4]={tags=_[6],text="ok"}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ok"
|
||||
}, {
|
||||
data = "[o, k]",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "[o, k]"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="ok",tags=_[5]}
|
||||
_[4]={tags=_[5],text="ok"}
|
||||
_[3]={_[4]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,19 +1,23 @@
|
|||
local _={}
|
||||
_[8]={}
|
||||
_[7]={}
|
||||
_[6]={}
|
||||
_[5]={data="[]",tags=_[7]}
|
||||
_[4]={data="ok",tags=_[6]}
|
||||
_[3]={_[4],_[5]}
|
||||
_[6]={tags=_[8],text="[]"}
|
||||
_[5]={tags=_[7],text="k"}
|
||||
_[4]={tags=_[7],text="o"}
|
||||
_[3]={_[4],_[5],_[6]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "o"
|
||||
}, {
|
||||
data = "[]",
|
||||
tags = {}
|
||||
tags = <table 1>,
|
||||
text = "k"
|
||||
}, {
|
||||
tags = {},
|
||||
text = "[]"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,19 +1,23 @@
|
|||
local _={}
|
||||
_[8]={}
|
||||
_[7]={}
|
||||
_[6]={}
|
||||
_[5]={data="[o, k]",tags=_[7]}
|
||||
_[4]={data="ok",tags=_[6]}
|
||||
_[3]={_[4],_[5]}
|
||||
_[6]={tags=_[8],text="[o, k]"}
|
||||
_[5]={tags=_[7],text="k"}
|
||||
_[4]={tags=_[7],text="o"}
|
||||
_[3]={_[4],_[5],_[6]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "o"
|
||||
}, {
|
||||
data = "[o, k]",
|
||||
tags = {}
|
||||
tags = <table 1>,
|
||||
text = "k"
|
||||
}, {
|
||||
tags = {},
|
||||
text = "[o, k]"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,18 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="ok",tags=_[5]}
|
||||
_[3]={_[4]}
|
||||
_[6]={}
|
||||
_[5]={tags=_[6],text="k"}
|
||||
_[4]={tags=_[6],text="o"}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "o"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "k"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,18 +1,20 @@
|
|||
local _={}
|
||||
_[23]={}
|
||||
_[22]={}
|
||||
_[21]={}
|
||||
_[20]={}
|
||||
_[19]={}
|
||||
_[18]={}
|
||||
_[17]={}
|
||||
_[16]={data="3",tags=_[21]}
|
||||
_[15]={data="v2=ok",tags=_[20]}
|
||||
_[14]={data="50",tags=_[19]}
|
||||
_[13]={data="v=50",tags=_[18]}
|
||||
_[12]={data="5",tags=_[17]}
|
||||
_[11]={_[16]}
|
||||
_[10]={_[15]}
|
||||
_[9]={_[14]}
|
||||
_[8]={_[13]}
|
||||
_[18]={tags=_[23],text="3"}
|
||||
_[17]={tags=_[22],text="ok"}
|
||||
_[16]={tags=_[22],text="v2="}
|
||||
_[15]={tags=_[21],text="50"}
|
||||
_[14]={tags=_[20],text="50"}
|
||||
_[13]={tags=_[20],text="v="}
|
||||
_[12]={tags=_[19],text="5"}
|
||||
_[11]={_[18]}
|
||||
_[10]={_[16],_[17]}
|
||||
_[9]={_[15]}
|
||||
_[8]={_[13],_[14]}
|
||||
_[7]={_[12]}
|
||||
_[6]={"return"}
|
||||
_[5]={"text",_[11]}
|
||||
|
|
@ -23,24 +25,30 @@ _[1]={"text",_[7]}
|
|||
return {_[1],_[2],_[3],_[4],_[5],_[6]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "5",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "5"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "v=50",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "v="
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "50"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "50",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "50"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "v2=ok",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "v2="
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "3",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "3"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,13 +1,16 @@
|
|||
local _={}
|
||||
_[13]={}
|
||||
_[12]={}
|
||||
_[11]={}
|
||||
_[10]={data="idk::esperanto::name::string is english or generic",tags=_[13]}
|
||||
_[9]={data="pierre::french::name::string is french",tags=_[12]}
|
||||
_[8]={data="bob::name::string is english or generic",tags=_[11]}
|
||||
_[7]={_[10]}
|
||||
_[6]={_[9]}
|
||||
_[5]={_[8]}
|
||||
_[16]={}
|
||||
_[15]={}
|
||||
_[14]={}
|
||||
_[13]={tags=_[16],text=" is english or generic"}
|
||||
_[12]={tags=_[16],text="idk::esperanto::name::string"}
|
||||
_[11]={tags=_[15],text=" is french"}
|
||||
_[10]={tags=_[15],text="pierre::french::name::string"}
|
||||
_[9]={tags=_[14],text=" is english or generic"}
|
||||
_[8]={tags=_[14],text="bob::name::string"}
|
||||
_[7]={_[12],_[13]}
|
||||
_[6]={_[10],_[11]}
|
||||
_[5]={_[8],_[9]}
|
||||
_[4]={"error","no compatible function found for call to a(number); potential candidates were:\n\9function custom type dispatch error.a(name::string) (at test/tests/function custom type dispatch error.ans:5): argument name is not of expected type string\n\9function custom type dispatch error.a(name:nom::french name) (at test/tests/function custom type dispatch error.ans:8): argument name is not of expected type french::name::string; at test/tests/function custom type dispatch error.ans:17"}
|
||||
_[3]={"text",_[7]}
|
||||
_[2]={"text",_[6]}
|
||||
|
|
@ -15,16 +18,25 @@ _[1]={"text",_[5]}
|
|||
return {_[1],_[2],_[3],_[4]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "bob::name::string is english or generic",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "bob::name::string"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " is english or generic"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "pierre::french::name::string is french",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "pierre::french::name::string"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " is french"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "idk::esperanto::name::string is english or generic",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "idk::esperanto::name::string"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " is english or generic"
|
||||
} } }
|
||||
{ "error", "no compatible function found for call to a(number); potential candidates were:\n\tfunction custom type dispatch error.a(name::string) (at test/tests/function custom type dispatch error.ans:5): argument name is not of expected type string\n\tfunction custom type dispatch error.a(name:nom::french name) (at test/tests/function custom type dispatch error.ans:8): argument name is not of expected type french::name::string; at test/tests/function custom type dispatch error.ans:17" }
|
||||
]]--
|
||||
|
|
@ -1,13 +1,16 @@
|
|||
local _={}
|
||||
_[13]={}
|
||||
_[12]={}
|
||||
_[11]={}
|
||||
_[10]={data="idk::esperanto::name::string is english or generic",tags=_[13]}
|
||||
_[9]={data="pierre::french::name::string is french",tags=_[12]}
|
||||
_[8]={data="bob::name::string is english or generic",tags=_[11]}
|
||||
_[7]={_[10]}
|
||||
_[6]={_[9]}
|
||||
_[5]={_[8]}
|
||||
_[16]={}
|
||||
_[15]={}
|
||||
_[14]={}
|
||||
_[13]={tags=_[16],text=" is english or generic"}
|
||||
_[12]={tags=_[16],text="idk::esperanto::name::string"}
|
||||
_[11]={tags=_[15],text=" is french"}
|
||||
_[10]={tags=_[15],text="pierre::french::name::string"}
|
||||
_[9]={tags=_[14],text=" is english or generic"}
|
||||
_[8]={tags=_[14],text="bob::name::string"}
|
||||
_[7]={_[12],_[13]}
|
||||
_[6]={_[10],_[11]}
|
||||
_[5]={_[8],_[9]}
|
||||
_[4]={"return"}
|
||||
_[3]={"text",_[7]}
|
||||
_[2]={"text",_[6]}
|
||||
|
|
@ -15,16 +18,25 @@ _[1]={"text",_[5]}
|
|||
return {_[1],_[2],_[3],_[4]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "bob::name::string is english or generic",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "bob::name::string"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " is english or generic"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "pierre::french::name::string is french",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "pierre::french::name::string"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " is french"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "idk::esperanto::name::string is english or generic",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "idk::esperanto::name::string"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " is english or generic"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -4,11 +4,11 @@ _[20]={}
|
|||
_[19]={}
|
||||
_[18]={}
|
||||
_[17]={}
|
||||
_[16]={data="b",tags=_[21]}
|
||||
_[15]={data="a",tags=_[20]}
|
||||
_[14]={data="c",tags=_[19]}
|
||||
_[13]={data="b",tags=_[18]}
|
||||
_[12]={data="a",tags=_[17]}
|
||||
_[16]={tags=_[21],text="b"}
|
||||
_[15]={tags=_[20],text="a"}
|
||||
_[14]={tags=_[19],text="c"}
|
||||
_[13]={tags=_[18],text="b"}
|
||||
_[12]={tags=_[17],text="a"}
|
||||
_[11]={_[16]}
|
||||
_[10]={_[15]}
|
||||
_[9]={_[14]}
|
||||
|
|
@ -23,24 +23,24 @@ _[1]={"text",_[7]}
|
|||
return {_[1],_[2],_[3],_[4],_[5],_[6]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "c",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,22 +1,30 @@
|
|||
local _={}
|
||||
_[9]={}
|
||||
_[8]={}
|
||||
_[7]={data="a.\240\159\145\129\239\184\143: 1",tags=_[9]}
|
||||
_[6]={data="a.\240\159\145\129\239\184\143: 0",tags=_[8]}
|
||||
_[5]={_[7]}
|
||||
_[4]={_[6]}
|
||||
_[11]={}
|
||||
_[10]={}
|
||||
_[9]={tags=_[11],text="1"}
|
||||
_[8]={tags=_[11],text="a.\240\159\145\129\239\184\143: "}
|
||||
_[7]={tags=_[10],text="0"}
|
||||
_[6]={tags=_[10],text="a.\240\159\145\129\239\184\143: "}
|
||||
_[5]={_[8],_[9]}
|
||||
_[4]={_[6],_[7]}
|
||||
_[3]={"return"}
|
||||
_[2]={"text",_[5]}
|
||||
_[1]={"text",_[4]}
|
||||
return {_[1],_[2],_[3]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a.👁️: 0",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "a.👁️: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "0"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "a.👁️: 1",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "a.👁️: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "1"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,37 +1,45 @@
|
|||
local _={}
|
||||
_[17]={}
|
||||
_[16]={}
|
||||
_[15]={}
|
||||
_[14]={}
|
||||
_[13]={}
|
||||
_[12]={}
|
||||
_[11]={}
|
||||
_[10]={data="ok",tags=_[15]}
|
||||
_[9]={data="a.\240\159\145\129\239\184\143: 1",tags=_[14]}
|
||||
_[8]={data="ko",tags=_[13]}
|
||||
_[7]={data="In function:",tags=_[12]}
|
||||
_[6]={data="a.\240\159\145\129\239\184\143: 0",tags=_[11]}
|
||||
_[5]={_[7],_[8],_[9],_[10]}
|
||||
_[4]={_[6]}
|
||||
_[12]={tags=_[17],text="ok"}
|
||||
_[11]={tags=_[16],text="1"}
|
||||
_[10]={tags=_[16],text="a.\240\159\145\129\239\184\143: "}
|
||||
_[9]={tags=_[15],text="ko"}
|
||||
_[8]={tags=_[14],text="In function:"}
|
||||
_[7]={tags=_[13],text="0"}
|
||||
_[6]={tags=_[13],text="a.\240\159\145\129\239\184\143: "}
|
||||
_[5]={_[8],_[9],_[10],_[11],_[12]}
|
||||
_[4]={_[6],_[7]}
|
||||
_[3]={"return"}
|
||||
_[2]={"text",_[5]}
|
||||
_[1]={"text",_[4]}
|
||||
return {_[1],_[2],_[3]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a.👁️: 0",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "a.👁️: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "0"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "In function:",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "In function:"
|
||||
}, {
|
||||
data = "ko",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ko"
|
||||
}, {
|
||||
data = "a.👁️: 1",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "a.👁️: "
|
||||
}, {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = <table 1>,
|
||||
text = "1"
|
||||
}, {
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,18 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="a.\240\159\145\129\239\184\143: 0",tags=_[5]}
|
||||
_[3]={_[4]}
|
||||
_[6]={}
|
||||
_[5]={tags=_[6],text="0"}
|
||||
_[4]={tags=_[6],text="a.\240\159\145\129\239\184\143: "}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a.👁️: 0",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "a.👁️: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "0"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
local _={}
|
||||
_[9]={}
|
||||
_[8]={}
|
||||
_[7]={data="x",tags=_[9]}
|
||||
_[6]={data="a",tags=_[8]}
|
||||
_[7]={tags=_[9],text="x"}
|
||||
_[6]={tags=_[8],text="a"}
|
||||
_[5]={_[7]}
|
||||
_[4]={_[6]}
|
||||
_[3]={"return"}
|
||||
|
|
@ -11,12 +11,12 @@ _[1]={"text",_[4]}
|
|||
return {_[1],_[2],_[3]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "x",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "x"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -4,11 +4,11 @@ _[20]={}
|
|||
_[19]={}
|
||||
_[18]={}
|
||||
_[17]={}
|
||||
_[16]={data="c",tags=_[21]}
|
||||
_[15]={data="c",tags=_[20]}
|
||||
_[14]={data="c",tags=_[19]}
|
||||
_[13]={data="b",tags=_[18]}
|
||||
_[12]={data="a",tags=_[17]}
|
||||
_[16]={tags=_[21],text="c"}
|
||||
_[15]={tags=_[20],text="c"}
|
||||
_[14]={tags=_[19],text="c"}
|
||||
_[13]={tags=_[18],text="b"}
|
||||
_[12]={tags=_[17],text="a"}
|
||||
_[11]={_[16]}
|
||||
_[10]={_[15]}
|
||||
_[9]={_[14]}
|
||||
|
|
@ -23,24 +23,24 @@ _[1]={"text",_[7]}
|
|||
return {_[1],_[2],_[3],_[4],_[5],_[6]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "c",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "c",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "c",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -4,11 +4,11 @@ _[20]={}
|
|||
_[19]={}
|
||||
_[18]={}
|
||||
_[17]={}
|
||||
_[16]={data="a",tags=_[21]}
|
||||
_[15]={data="a",tags=_[20]}
|
||||
_[14]={data="b",tags=_[19]}
|
||||
_[13]={data="a",tags=_[18]}
|
||||
_[12]={data="b",tags=_[17]}
|
||||
_[16]={tags=_[21],text="a"}
|
||||
_[15]={tags=_[20],text="a"}
|
||||
_[14]={tags=_[19],text="b"}
|
||||
_[13]={tags=_[18],text="a"}
|
||||
_[12]={tags=_[17],text="b"}
|
||||
_[11]={_[16]}
|
||||
_[10]={_[15]}
|
||||
_[9]={_[14]}
|
||||
|
|
@ -23,24 +23,24 @@ _[1]={"text",_[7]}
|
|||
return {_[1],_[2],_[3],_[4],_[5],_[6]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
local _={}
|
||||
_[7]={}
|
||||
_[6]={}
|
||||
_[5]={data="2",tags=_[7]}
|
||||
_[4]={data="5",tags=_[6]}
|
||||
_[5]={tags=_[7],text="2"}
|
||||
_[4]={tags=_[6],text="5"}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "5",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "5"
|
||||
}, {
|
||||
data = "2",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "2"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="5",tags=_[5]}
|
||||
_[4]={tags=_[5],text="5"}
|
||||
_[3]={_[4]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "5",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "5"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
local _={}
|
||||
_[7]={}
|
||||
_[6]={}
|
||||
_[5]={data="2",tags=_[7]}
|
||||
_[4]={data="5",tags=_[6]}
|
||||
_[5]={tags=_[7],text="2"}
|
||||
_[4]={tags=_[6],text="5"}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "5",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "5"
|
||||
}, {
|
||||
data = "2",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "2"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="5",tags=_[5]}
|
||||
_[4]={tags=_[5],text="5"}
|
||||
_[3]={_[4]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "5",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "5"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,18 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="a: 5",tags=_[5]}
|
||||
_[3]={_[4]}
|
||||
_[6]={}
|
||||
_[5]={tags=_[6],text="5"}
|
||||
_[4]={tags=_[6],text="a: "}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a: 5",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "a: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "5"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
local _={}
|
||||
_[9]={}
|
||||
_[8]={}
|
||||
_[7]={data="4",tags=_[9]}
|
||||
_[6]={data="plopheh",tags=_[8]}
|
||||
_[7]={tags=_[9],text="4"}
|
||||
_[6]={tags=_[8],text="plopheh"}
|
||||
_[5]={_[7]}
|
||||
_[4]={_[6]}
|
||||
_[3]={"return"}
|
||||
|
|
@ -11,12 +11,12 @@ _[1]={"text",_[4]}
|
|||
return {_[1],_[2],_[3]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "plopheh",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "plopheh"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "4",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "4"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,18 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="2 = 2",tags=_[5]}
|
||||
_[3]={_[4]}
|
||||
_[6]={}
|
||||
_[5]={tags=_[6],text=" = 2"}
|
||||
_[4]={tags=_[6],text="2"}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "2 = 2",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "2"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " = 2"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -10,17 +10,17 @@ _[24]={}
|
|||
_[23]={}
|
||||
_[22]={}
|
||||
_[21]={}
|
||||
_[20]={data="gn",tags=_[31]}
|
||||
_[19]={data="gs",tags=_[30]}
|
||||
_[18]={data="gn",tags=_[29]}
|
||||
_[17]={data="gs",tags=_[28]}
|
||||
_[16]={data="gn",tags=_[27]}
|
||||
_[15]={data="gs",tags=_[26]}
|
||||
_[14]={data="gn",tags=_[25]}
|
||||
_[13]={data="gs",tags=_[24]}
|
||||
_[12]={data="a",tags=_[23]}
|
||||
_[11]={data="x",tags=_[22]}
|
||||
_[10]={data="a",tags=_[21]}
|
||||
_[20]={tags=_[31],text="gn"}
|
||||
_[19]={tags=_[30],text="gs"}
|
||||
_[18]={tags=_[29],text="gn"}
|
||||
_[17]={tags=_[28],text="gs"}
|
||||
_[16]={tags=_[27],text="gn"}
|
||||
_[15]={tags=_[26],text="gs"}
|
||||
_[14]={tags=_[25],text="gn"}
|
||||
_[13]={tags=_[24],text="gs"}
|
||||
_[12]={tags=_[23],text="a"}
|
||||
_[11]={tags=_[22],text="x"}
|
||||
_[10]={tags=_[21],text="a"}
|
||||
_[9]={_[13],_[14],_[15],_[16],_[17],_[18],_[19],_[20]}
|
||||
_[8]={_[12]}
|
||||
_[7]={_[11]}
|
||||
|
|
@ -33,41 +33,41 @@ _[1]={"text",_[6]}
|
|||
return {_[1],_[2],_[3],_[4],_[5]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "x",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "x"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "gs",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "gs"
|
||||
}, {
|
||||
data = "gn",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "gn"
|
||||
}, {
|
||||
data = "gs",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "gs"
|
||||
}, {
|
||||
data = "gn",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "gn"
|
||||
}, {
|
||||
data = "gs",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "gs"
|
||||
}, {
|
||||
data = "gn",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "gn"
|
||||
}, {
|
||||
data = "gs",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "gs"
|
||||
}, {
|
||||
data = "gn",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "gn"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
local _={}
|
||||
_[9]={}
|
||||
_[8]={}
|
||||
_[7]={data="x",tags=_[9]}
|
||||
_[6]={data="a",tags=_[8]}
|
||||
_[7]={tags=_[9],text="x"}
|
||||
_[6]={tags=_[8],text="a"}
|
||||
_[5]={_[7]}
|
||||
_[4]={_[6]}
|
||||
_[3]={"return"}
|
||||
|
|
@ -11,12 +11,12 @@ _[1]={"text",_[4]}
|
|||
return {_[1],_[2],_[3]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "x",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "x"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
local _={}
|
||||
_[9]={}
|
||||
_[8]={}
|
||||
_[7]={data="ok",tags=_[9]}
|
||||
_[6]={data="ok",tags=_[8]}
|
||||
_[7]={tags=_[9],text="ok"}
|
||||
_[6]={tags=_[8],text="ok"}
|
||||
_[5]={_[7]}
|
||||
_[4]={_[6]}
|
||||
_[3]={"return"}
|
||||
|
|
@ -11,12 +11,12 @@ _[1]={"text",_[4]}
|
|||
return {_[1],_[2],_[3]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,18 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="ok",tags=_[5]}
|
||||
_[3]={_[4]}
|
||||
_[6]={}
|
||||
_[5]={tags=_[6],text="k"}
|
||||
_[4]={tags=_[6],text="o"}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "o"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "k"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="[]",tags=_[5]}
|
||||
_[4]={tags=_[5],text="[]"}
|
||||
_[3]={_[4]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "[]",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "[]"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="[o, k]",tags=_[5]}
|
||||
_[4]={tags=_[5],text="[o, k]"}
|
||||
_[3]={_[4]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "[o, k]",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "[o, k]"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="ok",tags=_[5]}
|
||||
_[4]={tags=_[5],text="ok"}
|
||||
_[3]={_[4]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,12 +1,14 @@
|
|||
local _={}
|
||||
_[14]={}
|
||||
_[13]={}
|
||||
_[12]={}
|
||||
_[11]={}
|
||||
_[10]={}
|
||||
_[9]={data="no",tags=_[12]}
|
||||
_[8]={data="in interrupt: 5",tags=_[11]}
|
||||
_[7]={data="before: 2",tags=_[10]}
|
||||
_[6]={_[8],_[9]}
|
||||
_[5]={_[7]}
|
||||
_[11]={tags=_[14],text="no"}
|
||||
_[10]={tags=_[13],text="5"}
|
||||
_[9]={tags=_[13],text="in interrupt: "}
|
||||
_[8]={tags=_[12],text="2"}
|
||||
_[7]={tags=_[12],text="before: "}
|
||||
_[6]={_[9],_[10],_[11]}
|
||||
_[5]={_[7],_[8]}
|
||||
_[4]={"return"}
|
||||
_[3]={"text",_[6]}
|
||||
_[2]={"wait",0}
|
||||
|
|
@ -14,16 +16,22 @@ _[1]={"text",_[5]}
|
|||
return {_[1],_[2],_[3],_[4]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "before: 2",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "before: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "2"
|
||||
} } }
|
||||
{ "wait", 0 }
|
||||
{ "text", { {
|
||||
data = "in interrupt: 5",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "in interrupt: "
|
||||
}, {
|
||||
data = "no",
|
||||
tags = {}
|
||||
tags = <table 1>,
|
||||
text = "5"
|
||||
}, {
|
||||
tags = {},
|
||||
text = "no"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,10 +1,12 @@
|
|||
local _={}
|
||||
_[10]={}
|
||||
_[9]={}
|
||||
_[8]={data="in interrupt: 5",tags=_[10]}
|
||||
_[7]={data="before: 2",tags=_[9]}
|
||||
_[6]={_[8]}
|
||||
_[5]={_[7]}
|
||||
_[12]={}
|
||||
_[11]={}
|
||||
_[10]={tags=_[12],text="5"}
|
||||
_[9]={tags=_[12],text="in interrupt: "}
|
||||
_[8]={tags=_[11],text="2"}
|
||||
_[7]={tags=_[11],text="before: "}
|
||||
_[6]={_[9],_[10]}
|
||||
_[5]={_[7],_[8]}
|
||||
_[4]={"return"}
|
||||
_[3]={"text",_[6]}
|
||||
_[2]={"wait",0}
|
||||
|
|
@ -12,13 +14,19 @@ _[1]={"text",_[5]}
|
|||
return {_[1],_[2],_[3],_[4]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "before: 2",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "before: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "2"
|
||||
} } }
|
||||
{ "wait", 0 }
|
||||
{ "text", { {
|
||||
data = "in interrupt: 5",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "in interrupt: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "5"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,10 +1,12 @@
|
|||
local _={}
|
||||
_[10]={}
|
||||
_[9]={}
|
||||
_[8]={data="in interrupt: 5",tags=_[10]}
|
||||
_[7]={data="before: 2",tags=_[9]}
|
||||
_[6]={_[8]}
|
||||
_[5]={_[7]}
|
||||
_[12]={}
|
||||
_[11]={}
|
||||
_[10]={tags=_[12],text="5"}
|
||||
_[9]={tags=_[12],text="in interrupt: "}
|
||||
_[8]={tags=_[11],text="2"}
|
||||
_[7]={tags=_[11],text="before: "}
|
||||
_[6]={_[9],_[10]}
|
||||
_[5]={_[7],_[8]}
|
||||
_[4]={"return"}
|
||||
_[3]={"text",_[6]}
|
||||
_[2]={"wait",0}
|
||||
|
|
@ -12,13 +14,19 @@ _[1]={"text",_[5]}
|
|||
return {_[1],_[2],_[3],_[4]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "before: 2",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "before: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "2"
|
||||
} } }
|
||||
{ "wait", 0 }
|
||||
{ "text", { {
|
||||
data = "in interrupt: 5",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "in interrupt: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "5"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,15 +1,19 @@
|
|||
local _={}
|
||||
_[6]={}
|
||||
_[5]={data="before: 2",tags=_[6]}
|
||||
_[4]={_[5]}
|
||||
_[7]={}
|
||||
_[6]={tags=_[7],text="2"}
|
||||
_[5]={tags=_[7],text="before: "}
|
||||
_[4]={_[5],_[6]}
|
||||
_[3]={"return",""}
|
||||
_[2]={"wait",0}
|
||||
_[1]={"text",_[4]}
|
||||
return {_[1],_[2],_[3]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "before: 2",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "before: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "2"
|
||||
} } }
|
||||
{ "wait", 0 }
|
||||
{ "return", "" }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,12 @@
|
|||
local _={}
|
||||
_[65]={}
|
||||
_[64]={}
|
||||
_[63]={}
|
||||
_[62]={}
|
||||
_[61]={}
|
||||
_[60]={}
|
||||
_[59]={}
|
||||
_[58]={}
|
||||
_[57]={}
|
||||
_[56]={}
|
||||
_[55]={}
|
||||
|
|
@ -11,42 +19,42 @@ _[49]={}
|
|||
_[48]={}
|
||||
_[47]={}
|
||||
_[46]={}
|
||||
_[45]={}
|
||||
_[44]={}
|
||||
_[43]={}
|
||||
_[42]={}
|
||||
_[41]={}
|
||||
_[40]={}
|
||||
_[39]={}
|
||||
_[38]={}
|
||||
_[37]={data="0 = b b 0",tags=_[57]}
|
||||
_[36]={data="b",tags=_[56]}
|
||||
_[35]={data="b",tags=_[55]}
|
||||
_[34]={data="1 = a 1",tags=_[54]}
|
||||
_[33]={data="a",tags=_[53]}
|
||||
_[32]={data="1 = b a 1",tags=_[52]}
|
||||
_[31]={data="a",tags=_[51]}
|
||||
_[30]={data="b",tags=_[50]}
|
||||
_[29]={data="1 = a 1",tags=_[49]}
|
||||
_[28]={data="a",tags=_[48]}
|
||||
_[27]={data="0 = b 0",tags=_[47]}
|
||||
_[26]={data="b",tags=_[46]}
|
||||
_[25]={data="1 = a a 1",tags=_[45]}
|
||||
_[24]={data="a",tags=_[44]}
|
||||
_[23]={data="a",tags=_[43]}
|
||||
_[22]={data="0 = b 0",tags=_[42]}
|
||||
_[21]={data="b",tags=_[41]}
|
||||
_[20]={data="0 = a b 0",tags=_[40]}
|
||||
_[19]={data="b",tags=_[39]}
|
||||
_[18]={data="a",tags=_[38]}
|
||||
_[17]={_[35],_[36],_[37]}
|
||||
_[16]={_[33],_[34]}
|
||||
_[15]={_[30],_[31],_[32]}
|
||||
_[14]={_[28],_[29]}
|
||||
_[13]={_[26],_[27]}
|
||||
_[12]={_[23],_[24],_[25]}
|
||||
_[11]={_[21],_[22]}
|
||||
_[10]={_[18],_[19],_[20]}
|
||||
_[45]={tags=_[65],text=" = b b 0"}
|
||||
_[44]={tags=_[65],text="0"}
|
||||
_[43]={tags=_[64],text="b"}
|
||||
_[42]={tags=_[63],text="b"}
|
||||
_[41]={tags=_[62],text=" = a 1"}
|
||||
_[40]={tags=_[62],text="1"}
|
||||
_[39]={tags=_[61],text="a"}
|
||||
_[38]={tags=_[60],text=" = b a 1"}
|
||||
_[37]={tags=_[60],text="1"}
|
||||
_[36]={tags=_[59],text="a"}
|
||||
_[35]={tags=_[58],text="b"}
|
||||
_[34]={tags=_[57],text=" = a 1"}
|
||||
_[33]={tags=_[57],text="1"}
|
||||
_[32]={tags=_[56],text="a"}
|
||||
_[31]={tags=_[55],text=" = b 0"}
|
||||
_[30]={tags=_[55],text="0"}
|
||||
_[29]={tags=_[54],text="b"}
|
||||
_[28]={tags=_[53],text=" = a a 1"}
|
||||
_[27]={tags=_[53],text="1"}
|
||||
_[26]={tags=_[52],text="a"}
|
||||
_[25]={tags=_[51],text="a"}
|
||||
_[24]={tags=_[50],text=" = b 0"}
|
||||
_[23]={tags=_[50],text="0"}
|
||||
_[22]={tags=_[49],text="b"}
|
||||
_[21]={tags=_[48],text=" = a b 0"}
|
||||
_[20]={tags=_[48],text="0"}
|
||||
_[19]={tags=_[47],text="b"}
|
||||
_[18]={tags=_[46],text="a"}
|
||||
_[17]={_[42],_[43],_[44],_[45]}
|
||||
_[16]={_[39],_[40],_[41]}
|
||||
_[15]={_[35],_[36],_[37],_[38]}
|
||||
_[14]={_[32],_[33],_[34]}
|
||||
_[13]={_[29],_[30],_[31]}
|
||||
_[12]={_[25],_[26],_[27],_[28]}
|
||||
_[11]={_[22],_[23],_[24]}
|
||||
_[10]={_[18],_[19],_[20],_[21]}
|
||||
_[9]={"return"}
|
||||
_[8]={"text",_[17]}
|
||||
_[7]={"text",_[16]}
|
||||
|
|
@ -59,72 +67,96 @@ _[1]={"text",_[10]}
|
|||
return {_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
}, {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
}, {
|
||||
data = "0 = a b 0",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "0"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " = a b 0"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
}, {
|
||||
data = "0 = b 0",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "0"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " = b 0"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
}, {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
}, {
|
||||
data = "1 = a a 1",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "1"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " = a a 1"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
}, {
|
||||
data = "0 = b 0",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "0"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " = b 0"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
}, {
|
||||
data = "1 = a 1",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "1"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " = a 1"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
}, {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
}, {
|
||||
data = "1 = b a 1",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "1"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " = b a 1"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
}, {
|
||||
data = "1 = a 1",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "1"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " = a 1"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
}, {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
}, {
|
||||
data = "0 = b b 0",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "0"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " = b b 0"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -8,15 +8,15 @@ _[32]={}
|
|||
_[31]={}
|
||||
_[30]={}
|
||||
_[29]={}
|
||||
_[28]={data="[3, 2, foo:c, bar:b]",tags=_[37]}
|
||||
_[27]={data="c",tags=_[36]}
|
||||
_[26]={data="[3, 2, foo:a, bar:b]",tags=_[35]}
|
||||
_[25]={data="b",tags=_[34]}
|
||||
_[24]={data="[3, 2, foo:a]",tags=_[33]}
|
||||
_[23]={data="a",tags=_[32]}
|
||||
_[22]={data="[3, 2]",tags=_[31]}
|
||||
_[21]={data="3",tags=_[30]}
|
||||
_[20]={data="[1, 2]",tags=_[29]}
|
||||
_[28]={tags=_[37],text="[3, 2, foo:c, bar:b]"}
|
||||
_[27]={tags=_[36],text="c"}
|
||||
_[26]={tags=_[35],text="[3, 2, foo:a, bar:b]"}
|
||||
_[25]={tags=_[34],text="b"}
|
||||
_[24]={tags=_[33],text="[3, 2, foo:a]"}
|
||||
_[23]={tags=_[32],text="a"}
|
||||
_[22]={tags=_[31],text="[3, 2]"}
|
||||
_[21]={tags=_[30],text="3"}
|
||||
_[20]={tags=_[29],text="[1, 2]"}
|
||||
_[19]={_[28]}
|
||||
_[18]={_[27]}
|
||||
_[17]={_[26]}
|
||||
|
|
@ -39,40 +39,40 @@ _[1]={"text",_[11]}
|
|||
return {_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9],_[10]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "[1, 2]",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "[1, 2]"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "3",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "3"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "[3, 2]",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "[3, 2]"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "[3, 2, foo:a]",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "[3, 2, foo:a]"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "[3, 2, foo:a, bar:b]",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "[3, 2, foo:a, bar:b]"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "c",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "[3, 2, foo:c, bar:b]",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "[3, 2, foo:c, bar:b]"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,30 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="abc = abc = abc",tags=_[5]}
|
||||
_[3]={_[4]}
|
||||
_[9]={}
|
||||
_[8]={tags=_[9],text="abc"}
|
||||
_[7]={tags=_[9],text=" = "}
|
||||
_[6]={tags=_[9],text="abc"}
|
||||
_[5]={tags=_[9],text=" = "}
|
||||
_[4]={tags=_[9],text="abc"}
|
||||
_[3]={_[4],_[5],_[6],_[7],_[8]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "abc = abc = abc",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "abc"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " = "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "abc"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " = "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "abc"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="15",tags=_[5]}
|
||||
_[4]={tags=_[5],text="15"}
|
||||
_[3]={_[4]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "15",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "15"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -2,9 +2,9 @@ local _={}
|
|||
_[11]={}
|
||||
_[10]={}
|
||||
_[9]={}
|
||||
_[8]={data="da",tags=_[11]}
|
||||
_[7]={data="ye",tags=_[10]}
|
||||
_[6]={data="yes",tags=_[9]}
|
||||
_[8]={tags=_[11],text="da"}
|
||||
_[7]={tags=_[10],text="ye"}
|
||||
_[6]={tags=_[9],text="yes"}
|
||||
_[5]={_[7],_[8]}
|
||||
_[4]={_[6]}
|
||||
_[3]={"return"}
|
||||
|
|
@ -13,15 +13,15 @@ _[1]={"text",_[4]}
|
|||
return {_[1],_[2],_[3]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "yes",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "yes"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "ye",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "ye"
|
||||
}, {
|
||||
data = "da",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "da"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,20 +1,22 @@
|
|||
local _={}
|
||||
_[31]={}
|
||||
_[33]={}
|
||||
_[32]={}
|
||||
_[31]={tags=_[33],text="h"}
|
||||
_[30]={}
|
||||
_[29]={}
|
||||
_[29]={tags=_[32],text="f"}
|
||||
_[28]={}
|
||||
_[27]={}
|
||||
_[26]={}
|
||||
_[25]={}
|
||||
_[24]={}
|
||||
_[23]={data="h",tags=_[31]}
|
||||
_[22]={data="g",tags=_[30]}
|
||||
_[21]={data="f",tags=_[29]}
|
||||
_[20]={data="e",tags=_[28]}
|
||||
_[19]={data="d",tags=_[27]}
|
||||
_[18]={data="c",tags=_[26]}
|
||||
_[17]={data="b",tags=_[25]}
|
||||
_[16]={data="a",tags=_[24]}
|
||||
_[23]={_[31]}
|
||||
_[22]={tags=_[30],text="g"}
|
||||
_[21]={_[29]}
|
||||
_[20]={tags=_[28],text="e"}
|
||||
_[19]={tags=_[27],text="d"}
|
||||
_[18]={tags=_[26],text="c"}
|
||||
_[17]={tags=_[25],text="b"}
|
||||
_[16]={tags=_[24],text="a"}
|
||||
_[15]={_[23]}
|
||||
_[14]={_[22]}
|
||||
_[13]={_[21]}
|
||||
|
|
@ -33,35 +35,35 @@ _[1]={"text",_[9]}
|
|||
return {_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "c",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "c"
|
||||
}, {
|
||||
data = "d",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "d"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "e",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { {
|
||||
data = "f",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "e"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "f"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
data = "g",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { {
|
||||
data = "h",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "g"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "h"
|
||||
} } } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,30 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="abc = abc = abc",tags=_[5]}
|
||||
_[3]={_[4]}
|
||||
_[9]={}
|
||||
_[8]={tags=_[9],text="abc"}
|
||||
_[7]={tags=_[9],text=" = "}
|
||||
_[6]={tags=_[9],text="abc"}
|
||||
_[5]={tags=_[9],text=" = "}
|
||||
_[4]={tags=_[9],text="abc"}
|
||||
_[3]={_[4],_[5],_[6],_[7],_[8]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "abc = abc = abc",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "abc"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " = "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "abc"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " = "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "abc"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,22 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="ok = ok",tags=_[5]}
|
||||
_[3]={_[4]}
|
||||
_[7]={}
|
||||
_[6]={tags=_[7],text="ok"}
|
||||
_[5]={tags=_[7],text=" = "}
|
||||
_[4]={tags=_[7],text="ok"}
|
||||
_[3]={_[4],_[5],_[6]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "ok = ok",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "ok"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " = "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -7,14 +7,14 @@ _[19]={}
|
|||
_[18]={}
|
||||
_[17]={}
|
||||
_[16]={}
|
||||
_[15]={data="b",tags=_[23]}
|
||||
_[14]={data="x",tags=_[22]}
|
||||
_[13]={data="Force no checkpoint:",tags=_[21]}
|
||||
_[12]={data="b",tags=_[20]}
|
||||
_[11]={data="a",tags=_[19]}
|
||||
_[10]={data="From checkpoint:",tags=_[18]}
|
||||
_[9]={data="a",tags=_[17]}
|
||||
_[8]={data="Force run checkpoint:",tags=_[16]}
|
||||
_[15]={tags=_[23],text="b"}
|
||||
_[14]={tags=_[22],text="x"}
|
||||
_[13]={tags=_[21],text="Force no checkpoint:"}
|
||||
_[12]={tags=_[20],text="b"}
|
||||
_[11]={tags=_[19],text="a"}
|
||||
_[10]={tags=_[18],text="From checkpoint:"}
|
||||
_[9]={tags=_[17],text="a"}
|
||||
_[8]={tags=_[16],text="Force run checkpoint:"}
|
||||
_[7]={_[13],_[14],_[15]}
|
||||
_[6]={_[10],_[11],_[12]}
|
||||
_[5]={_[8],_[9]}
|
||||
|
|
@ -25,31 +25,31 @@ _[1]={"text",_[5]}
|
|||
return {_[1],_[2],_[3],_[4]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "Force run checkpoint:",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "Force run checkpoint:"
|
||||
}, {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "From checkpoint:",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "From checkpoint:"
|
||||
}, {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
}, {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "Force no checkpoint:",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "Force no checkpoint:"
|
||||
}, {
|
||||
data = "x",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "x"
|
||||
}, {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -8,15 +8,15 @@ _[20]={}
|
|||
_[19]={}
|
||||
_[18]={}
|
||||
_[17]={}
|
||||
_[16]={data="b",tags=_[25]}
|
||||
_[15]={data="x",tags=_[24]}
|
||||
_[14]={data="Force no checkpoint:",tags=_[23]}
|
||||
_[13]={data="b",tags=_[22]}
|
||||
_[12]={data="a",tags=_[21]}
|
||||
_[11]={data="From checkpoint:",tags=_[20]}
|
||||
_[10]={data="b",tags=_[19]}
|
||||
_[9]={data="a",tags=_[18]}
|
||||
_[8]={data="Force run from checkpoint:",tags=_[17]}
|
||||
_[16]={tags=_[25],text="b"}
|
||||
_[15]={tags=_[24],text="x"}
|
||||
_[14]={tags=_[23],text="Force no checkpoint:"}
|
||||
_[13]={tags=_[22],text="b"}
|
||||
_[12]={tags=_[21],text="a"}
|
||||
_[11]={tags=_[20],text="From checkpoint:"}
|
||||
_[10]={tags=_[19],text="b"}
|
||||
_[9]={tags=_[18],text="a"}
|
||||
_[8]={tags=_[17],text="Force run from checkpoint:"}
|
||||
_[7]={_[14],_[15],_[16]}
|
||||
_[6]={_[11],_[12],_[13]}
|
||||
_[5]={_[8],_[9],_[10]}
|
||||
|
|
@ -27,34 +27,34 @@ _[1]={"text",_[5]}
|
|||
return {_[1],_[2],_[3],_[4]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "Force run from checkpoint:",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "Force run from checkpoint:"
|
||||
}, {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
}, {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "From checkpoint:",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "From checkpoint:"
|
||||
}, {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
}, {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "Force no checkpoint:",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "Force no checkpoint:"
|
||||
}, {
|
||||
data = "x",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "x"
|
||||
}, {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -8,15 +8,15 @@ _[20]={}
|
|||
_[19]={}
|
||||
_[18]={}
|
||||
_[17]={}
|
||||
_[16]={data="b",tags=_[25]}
|
||||
_[15]={data="x",tags=_[24]}
|
||||
_[14]={data="Force no checkpoint:",tags=_[23]}
|
||||
_[13]={data="b",tags=_[22]}
|
||||
_[12]={data="a",tags=_[21]}
|
||||
_[11]={data="From checkpoint:",tags=_[20]}
|
||||
_[10]={data="b",tags=_[19]}
|
||||
_[9]={data="x",tags=_[18]}
|
||||
_[8]={data="No checkpoint:",tags=_[17]}
|
||||
_[16]={tags=_[25],text="b"}
|
||||
_[15]={tags=_[24],text="x"}
|
||||
_[14]={tags=_[23],text="Force no checkpoint:"}
|
||||
_[13]={tags=_[22],text="b"}
|
||||
_[12]={tags=_[21],text="a"}
|
||||
_[11]={tags=_[20],text="From checkpoint:"}
|
||||
_[10]={tags=_[19],text="b"}
|
||||
_[9]={tags=_[18],text="x"}
|
||||
_[8]={tags=_[17],text="No checkpoint:"}
|
||||
_[7]={_[14],_[15],_[16]}
|
||||
_[6]={_[11],_[12],_[13]}
|
||||
_[5]={_[8],_[9],_[10]}
|
||||
|
|
@ -27,34 +27,34 @@ _[1]={"text",_[5]}
|
|||
return {_[1],_[2],_[3],_[4]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "No checkpoint:",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "No checkpoint:"
|
||||
}, {
|
||||
data = "x",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "x"
|
||||
}, {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "From checkpoint:",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "From checkpoint:"
|
||||
}, {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
}, {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "Force no checkpoint:",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "Force no checkpoint:"
|
||||
}, {
|
||||
data = "x",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "x"
|
||||
}, {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="b",tags=_[5]}
|
||||
_[4]={tags=_[5],text="b"}
|
||||
_[3]={_[4]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -17,24 +17,24 @@ _[49]={}
|
|||
_[48]={}
|
||||
_[47]={}
|
||||
_[46]={}
|
||||
_[45]={data="c",tags=_[63]}
|
||||
_[44]={data="a",tags=_[62]}
|
||||
_[43]={data="Force p checkpoint:",tags=_[61]}
|
||||
_[42]={data="d",tags=_[60]}
|
||||
_[41]={data="c",tags=_[59]}
|
||||
_[40]={data="b",tags=_[58]}
|
||||
_[39]={data="From q checkpoint again:",tags=_[57]}
|
||||
_[38]={data="d",tags=_[56]}
|
||||
_[37]={data="c",tags=_[55]}
|
||||
_[36]={data="b",tags=_[54]}
|
||||
_[35]={data="From q checkpoint:",tags=_[53]}
|
||||
_[34]={data="d",tags=_[52]}
|
||||
_[33]={data="c",tags=_[51]}
|
||||
_[32]={data="a",tags=_[50]}
|
||||
_[31]={data="From p checkpoint:",tags=_[49]}
|
||||
_[30]={data="d",tags=_[48]}
|
||||
_[29]={data="x",tags=_[47]}
|
||||
_[28]={data="From start:",tags=_[46]}
|
||||
_[45]={tags=_[63],text="c"}
|
||||
_[44]={tags=_[62],text="a"}
|
||||
_[43]={tags=_[61],text="Force p checkpoint:"}
|
||||
_[42]={tags=_[60],text="d"}
|
||||
_[41]={tags=_[59],text="c"}
|
||||
_[40]={tags=_[58],text="b"}
|
||||
_[39]={tags=_[57],text="From q checkpoint again:"}
|
||||
_[38]={tags=_[56],text="d"}
|
||||
_[37]={tags=_[55],text="c"}
|
||||
_[36]={tags=_[54],text="b"}
|
||||
_[35]={tags=_[53],text="From q checkpoint:"}
|
||||
_[34]={tags=_[52],text="d"}
|
||||
_[33]={tags=_[51],text="c"}
|
||||
_[32]={tags=_[50],text="a"}
|
||||
_[31]={tags=_[49],text="From p checkpoint:"}
|
||||
_[30]={tags=_[48],text="d"}
|
||||
_[29]={tags=_[47],text="x"}
|
||||
_[28]={tags=_[46],text="From start:"}
|
||||
_[27]={_[45]}
|
||||
_[26]={_[43],_[44]}
|
||||
_[25]={_[42]}
|
||||
|
|
@ -65,71 +65,71 @@ _[1]={"text",_[15]}
|
|||
return {_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9],_[10],_[11],_[12],_[13],_[14]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "From start:",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "From start:"
|
||||
}, {
|
||||
data = "x",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "x"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "d",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "d"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "From p checkpoint:",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "From p checkpoint:"
|
||||
}, {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "c",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "d",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "d"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "From q checkpoint:",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "From q checkpoint:"
|
||||
}, {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "c",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "d",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "d"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "From q checkpoint again:",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "From q checkpoint again:"
|
||||
}, {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "c",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "d",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "d"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "Force p checkpoint:",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "Force p checkpoint:"
|
||||
}, {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "c",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -2,18 +2,18 @@ local _={}
|
|||
_[32]={}
|
||||
_[31]={a="a"}
|
||||
_[30]={a="a",b="b"}
|
||||
_[29]={a="a",b="b",c="c"}
|
||||
_[29]={a="a",c="c",b="b"}
|
||||
_[28]={}
|
||||
_[27]={a="a",b="b"}
|
||||
_[26]={a="a"}
|
||||
_[25]={data="e",tags=_[32]}
|
||||
_[24]={data="d",tags=_[31]}
|
||||
_[23]={data="c",tags=_[30]}
|
||||
_[22]={data="b",tags=_[29]}
|
||||
_[21]={data="e",tags=_[28]}
|
||||
_[20]={data="d",tags=_[26]}
|
||||
_[19]={data="c",tags=_[27]}
|
||||
_[18]={data="a",tags=_[26]}
|
||||
_[25]={tags=_[32],text="e"}
|
||||
_[24]={tags=_[31],text="d"}
|
||||
_[23]={tags=_[30],text="c"}
|
||||
_[22]={tags=_[29],text="b"}
|
||||
_[21]={tags=_[28],text="e"}
|
||||
_[20]={tags=_[26],text="d"}
|
||||
_[19]={tags=_[27],text="c"}
|
||||
_[18]={tags=_[26],text="a"}
|
||||
_[17]={_[25]}
|
||||
_[16]={_[24]}
|
||||
_[15]={_[23]}
|
||||
|
|
@ -34,52 +34,52 @@ _[1]={"text",_[10]}
|
|||
return {_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {
|
||||
a = "a"
|
||||
}
|
||||
},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "c",
|
||||
tags = {
|
||||
a = "a",
|
||||
b = "b"
|
||||
}
|
||||
},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "d",
|
||||
tags = {
|
||||
a = "a"
|
||||
}
|
||||
},
|
||||
text = "d"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "e",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "e"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "b",
|
||||
tags = {
|
||||
a = "a",
|
||||
b = "b",
|
||||
c = "c"
|
||||
}
|
||||
},
|
||||
text = "b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "c",
|
||||
tags = {
|
||||
a = "a",
|
||||
b = "b"
|
||||
}
|
||||
},
|
||||
text = "c"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "d",
|
||||
tags = {
|
||||
a = "a"
|
||||
}
|
||||
},
|
||||
text = "d"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "e",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "e"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,71 +1,83 @@
|
|||
local _={}
|
||||
_[118]={}
|
||||
_[130]={}
|
||||
_[129]={}
|
||||
_[128]={}
|
||||
_[127]={}
|
||||
_[126]={}
|
||||
_[125]={}
|
||||
_[124]={}
|
||||
_[123]={}
|
||||
_[122]={}
|
||||
_[121]={}
|
||||
_[120]={text="c",tags=_[130]}
|
||||
_[119]={text="b",tags=_[129]}
|
||||
_[118]={text="a",tags=_[128]}
|
||||
_[117]={}
|
||||
_[116]={}
|
||||
_[115]={}
|
||||
_[114]={}
|
||||
_[113]={}
|
||||
_[116]={text="ab",tags=_[127]}
|
||||
_[115]={text="aa",tags=_[117]}
|
||||
_[114]={text="ab"}
|
||||
_[113]={text="aa"}
|
||||
_[112]={}
|
||||
_[111]={}
|
||||
_[110]={}
|
||||
_[109]={}
|
||||
_[111]={text="c",tags=_[126]}
|
||||
_[110]={text="b",tags=_[125]}
|
||||
_[109]={text="a",tags=_[112]}
|
||||
_[108]={}
|
||||
_[107]={}
|
||||
_[107]={text="c",tags=_[108]}
|
||||
_[106]={}
|
||||
_[105]={}
|
||||
_[104]={}
|
||||
_[103]={}
|
||||
_[104]={text="ab",tags=_[105]}
|
||||
_[103]={text="aa",tags=_[124]}
|
||||
_[102]={}
|
||||
_[101]={}
|
||||
_[101]={text="c",tags=_[102]}
|
||||
_[100]={}
|
||||
_[99]={}
|
||||
_[98]={}
|
||||
_[97]={}
|
||||
_[98]={text="b",tags=_[99]}
|
||||
_[97]={text="a",tags=_[123]}
|
||||
_[96]={}
|
||||
_[95]={}
|
||||
_[95]={text="c",tags=_[96]}
|
||||
_[94]={}
|
||||
_[93]={}
|
||||
_[92]={}
|
||||
_[93]={text="ab",tags=_[94]}
|
||||
_[92]={text="aa",tags=_[122]}
|
||||
_[91]={}
|
||||
_[90]={}
|
||||
_[90]={text="c",tags=_[91]}
|
||||
_[89]={}
|
||||
_[88]={}
|
||||
_[87]={}
|
||||
_[86]={data="c",tags=_[118]}
|
||||
_[85]={data="b",tags=_[117]}
|
||||
_[84]={data="a",tags=_[116]}
|
||||
_[83]={data="-> aa",tags=_[115]}
|
||||
_[82]={data="ab",tags=_[114]}
|
||||
_[81]={data="aa",tags=_[113]}
|
||||
_[80]={data="-> aa",tags=_[112]}
|
||||
_[79]={data="ab",tags=_[112]}
|
||||
_[78]={data="aa",tags=_[112]}
|
||||
_[77]={data="-> a",tags=_[112]}
|
||||
_[76]={data="c",tags=_[111]}
|
||||
_[75]={data="b",tags=_[110]}
|
||||
_[74]={data="a",tags=_[109]}
|
||||
_[73]={data="-> c",tags=_[108]}
|
||||
_[72]={data="c",tags=_[107]}
|
||||
_[71]={data="autoflush",tags=_[106]}
|
||||
_[70]={data="-> ab",tags=_[105]}
|
||||
_[69]={data="ab",tags=_[104]}
|
||||
_[68]={data="aa",tags=_[103]}
|
||||
_[67]={data="-> c",tags=_[102]}
|
||||
_[66]={data="c",tags=_[101]}
|
||||
_[65]={data="autoflush",tags=_[100]}
|
||||
_[64]={data="-> b",tags=_[99]}
|
||||
_[63]={data="b",tags=_[98]}
|
||||
_[62]={data="a",tags=_[97]}
|
||||
_[61]={data="-> c",tags=_[96]}
|
||||
_[60]={data="c",tags=_[95]}
|
||||
_[59]={data="-> ab",tags=_[94]}
|
||||
_[58]={data="ab",tags=_[93]}
|
||||
_[57]={data="aa",tags=_[92]}
|
||||
_[56]={data="-> c",tags=_[91]}
|
||||
_[55]={data="c",tags=_[90]}
|
||||
_[54]={data="-> b",tags=_[89]}
|
||||
_[53]={data="b",tags=_[88]}
|
||||
_[52]={data="a",tags=_[87]}
|
||||
_[88]={text="b",tags=_[89]}
|
||||
_[87]={text="a",tags=_[121]}
|
||||
_[86]={_[120]}
|
||||
_[85]={_[119]}
|
||||
_[84]={_[118]}
|
||||
_[83]={text="-> aa",tags=_[117]}
|
||||
_[82]={_[116]}
|
||||
_[81]={_[115]}
|
||||
_[80]={text="-> aa",tags=_[112]}
|
||||
_[79]={_[114]}
|
||||
_[78]={_[113]}
|
||||
_[77]={text="-> a",tags=_[112]}
|
||||
_[76]={_[111]}
|
||||
_[75]={_[110]}
|
||||
_[74]={_[109]}
|
||||
_[73]={text="-> c",tags=_[108]}
|
||||
_[72]={_[107]}
|
||||
_[71]={text="autoflush",tags=_[106]}
|
||||
_[70]={text="-> ab",tags=_[105]}
|
||||
_[69]={_[104]}
|
||||
_[68]={_[103]}
|
||||
_[67]={text="-> c",tags=_[102]}
|
||||
_[66]={_[101]}
|
||||
_[65]={text="autoflush",tags=_[100]}
|
||||
_[64]={text="-> b",tags=_[99]}
|
||||
_[63]={_[98]}
|
||||
_[62]={_[97]}
|
||||
_[61]={text="-> c",tags=_[96]}
|
||||
_[60]={_[95]}
|
||||
_[59]={text="-> ab",tags=_[94]}
|
||||
_[58]={_[93]}
|
||||
_[57]={_[92]}
|
||||
_[56]={text="-> c",tags=_[91]}
|
||||
_[55]={_[90]}
|
||||
_[54]={text="-> b",tags=_[89]}
|
||||
_[53]={_[88]}
|
||||
_[52]={_[87]}
|
||||
_[51]={_[84],_[85],_[86]}
|
||||
_[50]={_[83]}
|
||||
_[49]={_[81],_[82]}
|
||||
|
|
@ -91,7 +103,7 @@ _[30]={_[56]}
|
|||
_[29]={_[55]}
|
||||
_[28]={_[54]}
|
||||
_[27]={_[52],_[53]}
|
||||
_[26]={"error","invalid choice"}
|
||||
_[26]={"error","invalid choice; in event flush at test/tests/resume from paragraph with nested choice.ans:76"}
|
||||
_[25]={"choice",_[51]}
|
||||
_[24]={"text",_[50]}
|
||||
_[23]={"choice",_[49]}
|
||||
|
|
@ -117,137 +129,140 @@ _[4]={"text",_[30]}
|
|||
_[3]={"choice",_[29]}
|
||||
_[2]={"text",_[28]}
|
||||
_[1]={"choice",_[27]}
|
||||
return {_[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]}
|
||||
_[0]={_[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]}
|
||||
_[113].tags=_[112]
|
||||
_[114].tags=_[112]
|
||||
return _[0]
|
||||
--[[
|
||||
{ "choice", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "b",
|
||||
tags = {}
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "a"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "-> b"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "-> c"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "aa"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "ab"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "-> ab"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "-> c"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "a"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "-> b"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "-> b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "autoflush"
|
||||
} } }
|
||||
{ "choice", { {
|
||||
data = "c",
|
||||
tags = {}
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "-> c"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "aa"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "ab"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "-> ab"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "-> c",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { {
|
||||
data = "aa",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "ab",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "autoflush"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
data = "-> ab",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { {
|
||||
data = "c",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "-> c"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "a"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "b"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
data = "-> c",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "-> a"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = <1>{},
|
||||
text = "aa"
|
||||
} }, { {
|
||||
tags = <table 1>,
|
||||
text = "ab"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
data = "-> b",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "-> aa"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "aa"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "ab"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
data = "autoflush",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "-> aa"
|
||||
} } }
|
||||
{ "choice", { {
|
||||
data = "c",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "-> c",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { {
|
||||
data = "aa",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "ab",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "-> ab",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "autoflush",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { {
|
||||
data = "c",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "-> c",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "b",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "c",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "-> a",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { {
|
||||
data = "aa",
|
||||
tags = <1>{}
|
||||
}, {
|
||||
data = "ab",
|
||||
tags = <table 1>
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "-> aa",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { {
|
||||
data = "aa",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "ab",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "-> aa",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "choice", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "b",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "c",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "error", "invalid choice" }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "a"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "b"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "c"
|
||||
} } } }
|
||||
{ "error", "invalid choice; in event flush at test/tests/resume from paragraph with nested choice.ans:76" }
|
||||
]]--
|
||||
|
|
@ -3,10 +3,10 @@ _[17]={}
|
|||
_[16]={}
|
||||
_[15]={}
|
||||
_[14]={}
|
||||
_[13]={data="x",tags=_[17]}
|
||||
_[12]={data="y",tags=_[16]}
|
||||
_[11]={data="x",tags=_[15]}
|
||||
_[10]={data="x",tags=_[14]}
|
||||
_[13]={tags=_[17],text="x"}
|
||||
_[12]={tags=_[16],text="y"}
|
||||
_[11]={tags=_[15],text="x"}
|
||||
_[10]={tags=_[14],text="x"}
|
||||
_[9]={_[13]}
|
||||
_[8]={_[12]}
|
||||
_[7]={_[11]}
|
||||
|
|
@ -19,20 +19,20 @@ _[1]={"text",_[6]}
|
|||
return {_[1],_[2],_[3],_[4],_[5]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "x",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "x"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "x",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "x"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "y",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "y"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "x",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "x"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
local _={}
|
||||
_[13]={}
|
||||
_[12]={}
|
||||
_[11]={}
|
||||
_[10]={data="Yes.",tags=_[13]}
|
||||
_[9]={data="x",tags=_[12]}
|
||||
_[8]={data="a",tags=_[11]}
|
||||
_[11]={tags=_[12],text="a"}
|
||||
_[10]={tags=_[13],text="Yes."}
|
||||
_[9]={tags=_[12],text="x"}
|
||||
_[8]={_[11]}
|
||||
_[7]={_[10]}
|
||||
_[6]={_[9]}
|
||||
_[5]={_[8]}
|
||||
|
|
@ -14,17 +14,17 @@ _[2]={"text",_[6]}
|
|||
_[1]={"choice",_[5]}
|
||||
return {_[1],_[2],_[3],_[4]}
|
||||
--[[
|
||||
{ "choice", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "x"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "x",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "Yes.",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "Yes."
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,16 +1,23 @@
|
|||
local _={}
|
||||
_[17]={}
|
||||
_[16]={}
|
||||
_[15]={}
|
||||
_[14]={}
|
||||
_[13]={data="escaping expressions abc and stuff \\ and quotes \"",tags=_[17]}
|
||||
_[12]={data="other codes \n \\ \9",tags=_[16]}
|
||||
_[11]={data="quote \"",tags=_[15]}
|
||||
_[10]={data="expression a",tags=_[14]}
|
||||
_[9]={_[13]}
|
||||
_[8]={_[12]}
|
||||
_[7]={_[11]}
|
||||
_[6]={_[10]}
|
||||
_[24]={}
|
||||
_[23]={}
|
||||
_[22]={}
|
||||
_[21]={}
|
||||
_[20]={tags=_[24],text="escaping expressions abc and stuff \\ and quotes \""}
|
||||
_[19]={tags=_[23],text="\9"}
|
||||
_[18]={tags=_[23],text=" "}
|
||||
_[17]={tags=_[23],text="\\"}
|
||||
_[16]={tags=_[23],text=" "}
|
||||
_[15]={tags=_[23],text="\n"}
|
||||
_[14]={tags=_[23],text="other codes "}
|
||||
_[13]={tags=_[22],text="\""}
|
||||
_[12]={tags=_[22],text="quote "}
|
||||
_[11]={tags=_[21],text="a"}
|
||||
_[10]={tags=_[21],text="expression "}
|
||||
_[9]={_[20]}
|
||||
_[8]={_[14],_[15],_[16],_[17],_[18],_[19]}
|
||||
_[7]={_[12],_[13]}
|
||||
_[6]={_[10],_[11]}
|
||||
_[5]={"return"}
|
||||
_[4]={"text",_[9]}
|
||||
_[3]={"text",_[8]}
|
||||
|
|
@ -19,20 +26,41 @@ _[1]={"text",_[6]}
|
|||
return {_[1],_[2],_[3],_[4],_[5]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "expression a",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "expression "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = 'quote "',
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "quote "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = '"'
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "other codes \n \\ \t",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "other codes "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "\n"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "\\"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "\t"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = 'escaping expressions abc and stuff \\ and quotes "',
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = 'escaping expressions abc and stuff \\ and quotes "'
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
local _={}
|
||||
_[7]={1}
|
||||
_[6]={1}
|
||||
_[5]={data="bar",tags=_[7]}
|
||||
_[4]={data="foo",tags=_[6]}
|
||||
_[5]={tags=_[7],text="bar"}
|
||||
_[4]={tags=_[6],text="foo"}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "foo",
|
||||
tags = { 1 }
|
||||
tags = { 1 },
|
||||
text = "foo"
|
||||
}, {
|
||||
data = "bar",
|
||||
tags = { 1 }
|
||||
tags = { 1 },
|
||||
text = "bar"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -2,21 +2,21 @@ local _={}
|
|||
_[8]={2,3}
|
||||
_[7]={1,a=_[8]}
|
||||
_[6]={1}
|
||||
_[5]={data="bar",tags=_[7]}
|
||||
_[4]={data="foo",tags=_[6]}
|
||||
_[5]={tags=_[7],text="bar"}
|
||||
_[4]={tags=_[6],text="foo"}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "foo",
|
||||
tags = { 1 }
|
||||
tags = { 1 },
|
||||
text = "foo"
|
||||
}, {
|
||||
data = "bar",
|
||||
tags = { 1,
|
||||
a = { 2, 3 }
|
||||
}
|
||||
},
|
||||
text = "bar"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -2,21 +2,21 @@ local _={}
|
|||
_[8]={2,3}
|
||||
_[7]={1,a=_[8]}
|
||||
_[6]={1}
|
||||
_[5]={data="bar",tags=_[7]}
|
||||
_[4]={data="foo",tags=_[6]}
|
||||
_[5]={tags=_[7],text="bar"}
|
||||
_[4]={tags=_[6],text="foo"}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "foo",
|
||||
tags = { 1 }
|
||||
tags = { 1 },
|
||||
text = "foo"
|
||||
}, {
|
||||
data = "bar",
|
||||
tags = { 1,
|
||||
a = { 2, 3 }
|
||||
}
|
||||
},
|
||||
text = "bar"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
local _={}
|
||||
_[7]={1}
|
||||
_[6]={1}
|
||||
_[5]={data="bar",tags=_[7]}
|
||||
_[4]={data="foo",tags=_[6]}
|
||||
_[5]={tags=_[7],text="bar"}
|
||||
_[4]={tags=_[6],text="foo"}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "foo",
|
||||
tags = { 1 }
|
||||
tags = { 1 },
|
||||
text = "foo"
|
||||
}, {
|
||||
data = "bar",
|
||||
tags = { 1 }
|
||||
tags = { 1 },
|
||||
text = "bar"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -2,21 +2,21 @@ local _={}
|
|||
_[8]={2,3}
|
||||
_[7]={1,a=_[8]}
|
||||
_[6]={1}
|
||||
_[5]={data="bar",tags=_[7]}
|
||||
_[4]={data="foo",tags=_[6]}
|
||||
_[5]={tags=_[7],text="bar"}
|
||||
_[4]={tags=_[6],text="foo"}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "foo",
|
||||
tags = { 1 }
|
||||
tags = { 1 },
|
||||
text = "foo"
|
||||
}, {
|
||||
data = "bar",
|
||||
tags = { 1,
|
||||
a = { 2, 3 }
|
||||
}
|
||||
},
|
||||
text = "bar"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
local _={}
|
||||
_[7]={}
|
||||
_[6]={}
|
||||
_[5]={data="b c",tags=_[7]}
|
||||
_[4]={data="a",tags=_[6]}
|
||||
_[5]={tags=_[7],text="b c"}
|
||||
_[4]={tags=_[6],text="a"}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
}, {
|
||||
data = "b c",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b c"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
local _={}
|
||||
_[9]={}
|
||||
_[8]={}
|
||||
_[7]={data="b c",tags=_[9]}
|
||||
_[6]={data="a",tags=_[8]}
|
||||
_[7]={tags=_[9],text="b c"}
|
||||
_[6]={tags=_[8],text="a"}
|
||||
_[5]={_[7]}
|
||||
_[4]={_[6]}
|
||||
_[3]={"return"}
|
||||
|
|
@ -11,12 +11,12 @@ _[1]={"text",_[4]}
|
|||
return {_[1],_[2],_[3]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "b c",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "b c"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,18 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="a: 5",tags=_[5]}
|
||||
_[3]={_[4]}
|
||||
_[6]={}
|
||||
_[5]={tags=_[6],text="5"}
|
||||
_[4]={tags=_[6],text="a: "}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a: 5",
|
||||
tags = {}
|
||||
tags = <1>{},
|
||||
text = "a: "
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = "5"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
16
test/tests/text line interpolation with choice event.ans
Normal file
16
test/tests/text line interpolation with choice event.ans
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
Press {jump button} to jump.
|
||||
|
||||
$ jump button
|
||||
A # 1
|
||||
~ choose(1)
|
||||
> Surprise choice!
|
||||
ok
|
||||
|
||||
Use {move axis} to move.
|
||||
|
||||
$ move axis
|
||||
left # 1
|
||||
~ choose(1)
|
||||
> Surprise choice!
|
||||
ok2
|
||||
@" joystick"
|
||||
82
test/tests/text line interpolation with choice event.lua
Normal file
82
test/tests/text line interpolation with choice event.lua
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
local _={}
|
||||
_[36]={}
|
||||
_[35]={tags=_[36],text="Surprise choice!"}
|
||||
_[34]={1}
|
||||
_[33]={}
|
||||
_[32]={}
|
||||
_[31]={tags=_[32],text="Surprise choice!"}
|
||||
_[30]={1}
|
||||
_[29]={}
|
||||
_[28]={tags=_[33],text=" to move."}
|
||||
_[27]={tags=_[33],text=" joystick"}
|
||||
_[26]={tags=_[36],text="ok2"}
|
||||
_[25]={_[35]}
|
||||
_[24]={tags=_[34],text="left"}
|
||||
_[23]={tags=_[33],text="Use "}
|
||||
_[22]={tags=_[29],text=" to jump."}
|
||||
_[21]={tags=_[32],text="ok"}
|
||||
_[20]={_[31]}
|
||||
_[19]={tags=_[30],text="A"}
|
||||
_[18]={tags=_[29],text="Press "}
|
||||
_[17]={_[27],_[28]}
|
||||
_[16]={_[26]}
|
||||
_[15]={_[25]}
|
||||
_[14]={_[23],_[24]}
|
||||
_[13]={_[22]}
|
||||
_[12]={_[21]}
|
||||
_[11]={_[20]}
|
||||
_[10]={_[18],_[19]}
|
||||
_[9]={"return"}
|
||||
_[8]={"text",_[17]}
|
||||
_[7]={"text",_[16]}
|
||||
_[6]={"choice",_[15]}
|
||||
_[5]={"text",_[14]}
|
||||
_[4]={"text",_[13]}
|
||||
_[3]={"text",_[12]}
|
||||
_[2]={"choice",_[11]}
|
||||
_[1]={"text",_[10]}
|
||||
return {_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "Press "
|
||||
}, {
|
||||
tags = { 1 },
|
||||
text = "A"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "Surprise choice!"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "ok"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = " to jump."
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "Use "
|
||||
}, {
|
||||
tags = { 1 },
|
||||
text = "left"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "Surprise choice!"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "ok2"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = <1>{},
|
||||
text = " joystick"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " to move."
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
13
test/tests/text line interpolation with event flush.ans
Normal file
13
test/tests/text line interpolation with event flush.ans
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Press {jump button} to jump.
|
||||
|
||||
$ jump button
|
||||
A # 1
|
||||
|
||||
@
|
||||
|
||||
Use {move axis} to move.
|
||||
|
||||
$ move axis
|
||||
left # 1
|
||||
|
||||
@" joystick"
|
||||
50
test/tests/text line interpolation with event flush.lua
Normal file
50
test/tests/text line interpolation with event flush.lua
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
local _={}
|
||||
_[20]={1}
|
||||
_[19]={}
|
||||
_[18]={1}
|
||||
_[17]={}
|
||||
_[16]={text=" to move.",tags=_[19]}
|
||||
_[15]={text=" joystick",tags=_[19]}
|
||||
_[14]={text="left",tags=_[20]}
|
||||
_[13]={text="Use ",tags=_[19]}
|
||||
_[12]={text=" to jump.",tags=_[17]}
|
||||
_[11]={text="A",tags=_[18]}
|
||||
_[10]={text="Press ",tags=_[17]}
|
||||
_[9]={_[15],_[16]}
|
||||
_[8]={_[13],_[14]}
|
||||
_[7]={_[12]}
|
||||
_[6]={_[10],_[11]}
|
||||
_[5]={"return"}
|
||||
_[4]={"text",_[9]}
|
||||
_[3]={"text",_[8]}
|
||||
_[2]={"text",_[7]}
|
||||
_[1]={"text",_[6]}
|
||||
return {_[1],_[2],_[3],_[4],_[5]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "Press "
|
||||
}, {
|
||||
tags = { 1 },
|
||||
text = "A"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = " to jump."
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "Use "
|
||||
}, {
|
||||
tags = { 1 },
|
||||
text = "left"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = <1>{},
|
||||
text = " joystick"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " to move."
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
10
test/tests/text line interpolation with text event.ans
Normal file
10
test/tests/text line interpolation with text event.ans
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Press {jump button} to jump.
|
||||
|
||||
$ jump button
|
||||
A # 1
|
||||
|
||||
Use {move axis} to move.
|
||||
|
||||
$ move axis
|
||||
left # 1
|
||||
@" joystick"
|
||||
44
test/tests/text line interpolation with text event.lua
Normal file
44
test/tests/text line interpolation with text event.lua
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
local _={}
|
||||
_[16]={1}
|
||||
_[15]={}
|
||||
_[14]={1}
|
||||
_[13]={}
|
||||
_[12]={tags=_[15],text=" to move."}
|
||||
_[11]={tags=_[15],text=" joystick"}
|
||||
_[10]={tags=_[16],text="left"}
|
||||
_[9]={tags=_[15],text="Use "}
|
||||
_[8]={tags=_[13],text=" to jump."}
|
||||
_[7]={tags=_[14],text="A"}
|
||||
_[6]={tags=_[13],text="Press "}
|
||||
_[5]={_[9],_[10],_[11],_[12]}
|
||||
_[4]={_[6],_[7],_[8]}
|
||||
_[3]={"return"}
|
||||
_[2]={"text",_[5]}
|
||||
_[1]={"text",_[4]}
|
||||
return {_[1],_[2],_[3]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
tags = <1>{},
|
||||
text = "Press "
|
||||
}, {
|
||||
tags = { 1 },
|
||||
text = "A"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " to jump."
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = <1>{},
|
||||
text = "Use "
|
||||
}, {
|
||||
tags = { 1 },
|
||||
text = "left"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " joystick"
|
||||
}, {
|
||||
tags = <table 1>,
|
||||
text = " to move."
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="a",tags=_[5]}
|
||||
_[4]={tags=_[5],text="a"}
|
||||
_[3]={_[4]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a",
|
||||
tags = {}
|
||||
tags = {},
|
||||
text = "a"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue