119 lines
2.3 KiB
Plaintext
119 lines
2.3 KiB
Plaintext
==================
|
|
Table Declaration
|
|
==================
|
|
|
|
table <text, number> [
|
|
['answer', 42]
|
|
]
|
|
|
|
---
|
|
|
|
(root
|
|
(item
|
|
(statement
|
|
(expression
|
|
(value
|
|
(table
|
|
(identifier)
|
|
(identifier)
|
|
(expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(string)))
|
|
(expression
|
|
(value
|
|
(integer)))))))))))))))
|
|
==================
|
|
Table Assignment
|
|
==================
|
|
|
|
foobar = table <text, number> [
|
|
['answer', 42]
|
|
]
|
|
|
|
---
|
|
|
|
(root
|
|
(item
|
|
(statement
|
|
(assignment
|
|
(identifier)
|
|
(assignment_operator)
|
|
(statement
|
|
(expression
|
|
(value
|
|
(table
|
|
(identifier)
|
|
(identifier)
|
|
(expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(string)))
|
|
(expression
|
|
(value
|
|
(integer)))))))))))))))))
|
|
|
|
==================
|
|
Table Access
|
|
==================
|
|
|
|
select <number> from foobar {
|
|
text == 'answer'
|
|
}
|
|
|
|
---
|
|
|
|
(root
|
|
(item
|
|
(statement
|
|
(select
|
|
(identifier)
|
|
(expression
|
|
(identifier))
|
|
(item
|
|
(statement
|
|
(expression
|
|
(logic
|
|
(expression
|
|
(identifier))
|
|
(logic_operator)
|
|
(expression
|
|
(value
|
|
(string)))))))))))
|
|
|
|
==================
|
|
Table Insert
|
|
==================
|
|
|
|
insert into foobar [
|
|
['bob was here', 0]
|
|
]
|
|
|
|
---
|
|
|
|
(root
|
|
(item
|
|
(statement
|
|
(insert
|
|
(identifier)
|
|
(list
|
|
(expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(string)))
|
|
(expression
|
|
(value
|
|
(integer)))))))))))
|