142 lines
3.0 KiB
Plaintext
142 lines
3.0 KiB
Plaintext
==================
|
|
Table Declaration
|
|
==================
|
|
|
|
table <messages, numbers> [
|
|
['hiya', 42]
|
|
['foo', 57]
|
|
['bar', 99.99]
|
|
]
|
|
|
|
---
|
|
|
|
(root
|
|
(item
|
|
(statement
|
|
(expression
|
|
(value
|
|
(table
|
|
(identifier)
|
|
(identifier)
|
|
(expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(string)))
|
|
(expression
|
|
(value
|
|
(integer))))))
|
|
(expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(string)))
|
|
(expression
|
|
(value
|
|
(integer))))))
|
|
(expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(string)))
|
|
(expression
|
|
(value
|
|
(float)))))))))))))))
|
|
|
|
==================
|
|
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)
|
|
(expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(list
|
|
(expression
|
|
(value
|
|
(string)))
|
|
(expression
|
|
(value
|
|
(integer)))))))))))))
|