2023-10-18 21:52:56 +00:00
|
|
|
==================
|
|
|
|
Table Declaration
|
|
|
|
==================
|
|
|
|
|
2023-10-18 23:26:49 +00:00
|
|
|
table <text, number> [
|
2023-10-18 21:52:56 +00:00
|
|
|
['answer', 42]
|
2023-10-18 23:26:49 +00:00
|
|
|
]
|
2023-10-18 21:52:56 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(table
|
|
|
|
(identifier)
|
|
|
|
(identifier)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(list
|
|
|
|
(expression
|
|
|
|
(value
|
2023-10-18 23:26:49 +00:00
|
|
|
(list
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(string)))
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))))))))))))))
|
2023-10-18 21:52:56 +00:00
|
|
|
==================
|
|
|
|
Table Assignment
|
|
|
|
==================
|
|
|
|
|
2023-10-18 23:26:49 +00:00
|
|
|
foobar = table <text, number> [
|
2023-10-18 21:52:56 +00:00
|
|
|
['answer', 42]
|
2023-10-18 23:26:49 +00:00
|
|
|
]
|
2023-10-18 21:52:56 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(assignment
|
|
|
|
(identifier)
|
|
|
|
(assignment_operator)
|
|
|
|
(statement
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(table
|
|
|
|
(identifier)
|
|
|
|
(identifier)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(list
|
|
|
|
(expression
|
|
|
|
(value
|
2023-10-18 23:26:49 +00:00
|
|
|
(list
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(string)))
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))))))))))))))))
|
2023-10-18 21:52:56 +00:00
|
|
|
|
|
|
|
==================
|
|
|
|
Table Access
|
|
|
|
==================
|
|
|
|
|
|
|
|
select number from foobar where text == 'answer'
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(select
|
|
|
|
(identifier)
|
|
|
|
(identifier)
|
|
|
|
(expression
|
|
|
|
(logic
|
|
|
|
(expression
|
|
|
|
(identifier))
|
|
|
|
(logic_operator)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(string)))))))))
|
|
|
|
|
|
|
|
|
|
|
|
==================
|
|
|
|
Table Insert
|
|
|
|
==================
|
|
|
|
|
|
|
|
insert ['bob was here', 0] into foobar
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(insert
|
|
|
|
(list
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(string)))
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer))))
|
|
|
|
(identifier)))))
|