From 256e02775e94e0fb190037d8159773730bb56341 Mon Sep 17 00:00:00 2001 From: Alexis Nasr <alexis.nasr@lif.univ-mrs.fr> Date: Fri, 16 Feb 2018 16:06:28 +0100 Subject: [PATCH] added movement ignore --- maca_trans_parser/src/movements.c | 8 ++++++++ maca_trans_parser/src/movements.h | 1 + 2 files changed, 9 insertions(+) diff --git a/maca_trans_parser/src/movements.c b/maca_trans_parser/src/movements.c index 6c2f280..ae0c06c 100644 --- a/maca_trans_parser/src/movements.c +++ b/maca_trans_parser/src/movements.c @@ -81,6 +81,14 @@ int movement_right_arc_undo(config *c) return 1; } +int movement_ignore(config *c, int movement_code) +{ + if(word_buffer_end(config_get_buffer(c))) return 0; + config_push_mvt(c, movement_code, b0, NULL); + word_buffer_move_right(config_get_buffer(c)); + return 1; +} + int movement_shift(config *c, int movement_code) { /* if(word_buffer_is_empty(config_get_buffer(c))) return 0; */ diff --git a/maca_trans_parser/src/movements.h b/maca_trans_parser/src/movements.h index 9d8adf5..93bd47c 100644 --- a/maca_trans_parser/src/movements.h +++ b/maca_trans_parser/src/movements.h @@ -12,6 +12,7 @@ int movement_left_arc(config *c, int movement_code, int label); int movement_left_arc_undo(config *c); int movement_right_arc(config *c, int movement_code, int label); int movement_right_arc_undo(config *c); +int movement_ignore(config *c, int movement_code); int movement_shift(config *c, int movement_code); int movement_shift_undo(config *c); int movement_reduce(config *c, int movement_code); -- GitLab