|
@@ -51,6 +51,7 @@ where
|
|
|
make_parser_concrete!(def_l_greater_equal()),
|
|
|
make_parser_concrete!(def_l_less()),
|
|
|
make_parser_concrete!(def_l_less_equal()),
|
|
|
+ make_parser_concrete!(def_l_not_equal()),
|
|
|
make_parser_concrete!(def_l_or()),
|
|
|
make_parser_concrete!(def_package()),
|
|
|
make_parser_concrete!(def_shift_left()),
|
|
@@ -229,6 +230,26 @@ where
|
|
|
.map(|(((), ()), result)| Ok(result))
|
|
|
}
|
|
|
|
|
|
+fn def_l_not_equal<'a, 'c>() -> impl Parser<'a, 'c, AmlValue>
|
|
|
+where
|
|
|
+ 'c: 'a,
|
|
|
+{
|
|
|
+ /*
|
|
|
+ * DefLNotEqual := LNotOp(0x92) LEqualOp(0x93) Operand Operand
|
|
|
+ */
|
|
|
+ opcode(opcode::DEF_L_NOT_OP)
|
|
|
+ .then(opcode(opcode::DEF_L_EQUAL_OP))
|
|
|
+ .then(comment_scope(
|
|
|
+ DebugVerbosity::AllScopes,
|
|
|
+ "DefLNotEqual",
|
|
|
+ term_arg().then(term_arg()).map_with_context(|(left_arg, right_arg), context| {
|
|
|
+ let ord = try_with_context!(context, left_arg.cmp(right_arg, context));
|
|
|
+ (Ok(AmlValue::Boolean(ord != Ordering::Equal)), context)
|
|
|
+ }),
|
|
|
+ ))
|
|
|
+ .map(|(((), ()), result)| Ok(result))
|
|
|
+}
|
|
|
+
|
|
|
pub fn def_package<'a, 'c>() -> impl Parser<'a, 'c, AmlValue>
|
|
|
where
|
|
|
'c: 'a,
|