2023-09-29 18:32:18 +00:00
|
|
|
==================
|
2023-09-29 20:34:20 +00:00
|
|
|
Table Declaration
|
2023-09-29 18:32:18 +00:00
|
|
|
==================
|
|
|
|
|
|
|
|
table <text, number> {
|
2023-09-29 20:34:20 +00:00
|
|
|
['answer', 42]
|
2023-09-29 18:32:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
2023-10-01 04:01:02 +00:00
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(table
|
|
|
|
(identifier)
|
|
|
|
(identifier)
|
|
|
|
(list
|
|
|
|
(value
|
|
|
|
(string))
|
|
|
|
(value
|
|
|
|
(integer)))))))))
|
2023-09-29 20:34:20 +00:00
|
|
|
|
|
|
|
==================
|
|
|
|
Table Assignment
|
|
|
|
==================
|
|
|
|
|
|
|
|
foobar = table <text, number> {
|
|
|
|
['answer', 42]
|
|
|
|
}
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
2023-10-01 04:01:02 +00:00
|
|
|
(expression
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
2023-10-01 10:09:29 +00:00
|
|
|
(statement
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(table
|
|
|
|
(identifier)
|
|
|
|
(identifier)
|
|
|
|
(list
|
|
|
|
(value
|
|
|
|
(string))
|
|
|
|
(value
|
|
|
|
(integer))))))))))))
|
2023-09-29 20:54:13 +00:00
|
|
|
|
|
|
|
==================
|
|
|
|
Table Access
|
|
|
|
==================
|
|
|
|
|
|
|
|
select number from foobar where text == 'answer'
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
2023-10-01 04:01:02 +00:00
|
|
|
(expression
|
|
|
|
(select
|
|
|
|
(identifier)
|
|
|
|
(identifier)
|
|
|
|
(expression
|
|
|
|
(logic
|
|
|
|
(expression
|
|
|
|
(identifier))
|
|
|
|
(logic_operator)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(string))))))))))
|
2023-09-30 20:06:01 +00:00
|
|
|
|
2023-09-29 20:54:13 +00:00
|
|
|
|
|
|
|
==================
|
|
|
|
Table Insert
|
|
|
|
==================
|
|
|
|
|
|
|
|
insert ['bob was here', 0] into foobar
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
2023-10-01 04:01:02 +00:00
|
|
|
(expression
|
|
|
|
(insert
|
|
|
|
(list
|
|
|
|
(value
|
|
|
|
(string))
|
|
|
|
(value
|
|
|
|
(integer)))
|
|
|
|
(identifier))))))
|