2023-12-30 02:53:26 +00:00
|
|
|
================================================================================
|
|
|
|
Simple Logic
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
true && false
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(root
|
|
|
|
(statement
|
|
|
|
(expression
|
|
|
|
(logic
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(boolean)))
|
|
|
|
(logic_operator)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(boolean)))))))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Logic Sequence
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
1 == 2 || false
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(root
|
|
|
|
(statement
|
|
|
|
(expression
|
|
|
|
(logic
|
|
|
|
(expression
|
|
|
|
(logic
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))
|
|
|
|
(logic_operator)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))))
|
|
|
|
(logic_operator)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(boolean)))))))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Complex Logic Sequence
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
(length(suspects) == 1)
|
|
|
|
&& (length(rooms) == 1)
|
|
|
|
&& (length(weapons) == 1)
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(root
|
|
|
|
(statement
|
|
|
|
(expression
|
|
|
|
(logic
|
|
|
|
(expression
|
|
|
|
(logic
|
|
|
|
(expression
|
|
|
|
(logic
|
|
|
|
(expression
|
|
|
|
(function_call
|
|
|
|
(function_expression
|
2024-01-01 09:59:27 +00:00
|
|
|
(value
|
|
|
|
(built_in_value)))
|
2023-12-30 02:53:26 +00:00
|
|
|
(expression
|
|
|
|
(identifier))))
|
|
|
|
(logic_operator)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))))
|
|
|
|
(logic_operator)
|
|
|
|
(expression
|
|
|
|
(logic
|
|
|
|
(expression
|
|
|
|
(function_call
|
|
|
|
(function_expression
|
2024-01-01 09:59:27 +00:00
|
|
|
(value
|
|
|
|
(built_in_value)))
|
2023-12-30 02:53:26 +00:00
|
|
|
(expression
|
|
|
|
(identifier))))
|
|
|
|
(logic_operator)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))))))
|
|
|
|
(logic_operator)
|
|
|
|
(expression
|
|
|
|
(logic
|
|
|
|
(expression
|
|
|
|
(function_call
|
|
|
|
(function_expression
|
2024-01-01 09:59:27 +00:00
|
|
|
(value
|
|
|
|
(built_in_value)))
|
2023-12-30 02:53:26 +00:00
|
|
|
(expression
|
|
|
|
(identifier))))
|
|
|
|
(logic_operator)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))))))))
|