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
|
|
|
|
==================
|
|
|
|
|
2023-10-21 17:04:17 +00:00
|
|
|
select <number> from foobar {
|
|
|
|
text == 'answer'
|
|
|
|
}
|
2023-10-18 21:52:56 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(select
|
|
|
|
(identifier)
|
2023-10-21 17:04:17 +00:00
|
|
|
(expression
|
|
|
|
(identifier))
|
|
|
|
(item
|
|
|
|
(statement
|
2023-10-18 21:52:56 +00:00
|
|
|
(expression
|
2023-10-21 17:04:17 +00:00
|
|
|
(logic
|
|
|
|
(expression
|
|
|
|
(identifier))
|
|
|
|
(logic_operator)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(string)))))))))))
|
2023-10-18 21:52:56 +00:00
|
|
|
|
|
|
|
==================
|
|
|
|
Table Insert
|
|
|
|
==================
|
|
|
|
|
2023-10-22 17:55:56 +00:00
|
|
|
insert into foobar [
|
|
|
|
['bob was here', 0]
|
|
|
|
]
|
2023-10-18 21:52:56 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(insert
|
2023-10-22 17:55:56 +00:00
|
|
|
(identifier)
|
2023-10-22 18:29:07 +00:00
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(list
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(list
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(string)))
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))))))))))))
|