X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/cacfdef716f7ee2b6343cc2355a4e12fa175efe4..ed228e60b23b76d6910ca843b4bf39eb1d391029:/tests/local.at diff --git a/tests/local.at b/tests/local.at index 16f980e0..f691ab23 100644 --- a/tests/local.at +++ b/tests/local.at @@ -40,6 +40,25 @@ printf "$count\n";' $1], [0], [$3 ## Macros decoding Bison options. ## ## ------------------------------- ## +# AT_LOC_PUSHDEF(FIRST-LINE, FIRST-COLUMN, LAST-LINE, LAST-COLUMN) +# ---------------------------------------------------------------- +# Pushdef AT_LOC_(FIRST|LAST)_(LINE|COLUMN). +m4_define([AT_LOC_PUSHDEF], +[m4_pushdef([AT_LOC_FIRST_LINE], [AT_LOC.$1]) +m4_pushdef([AT_LOC_FIRST_COLUMN], [AT_LOC.$2]) +m4_pushdef([AT_LOC_LAST_LINE], [AT_LOC.$3]) +m4_pushdef([AT_LOC_LAST_COLUMN], [AT_LOC.$4])]) + +# AT_LOC_POPDEF +# ------------- +# Popdef AT_LOC_(FIRST|LAST)_(LINE|COL). +m4_define([AT_LOC_POPDEF], +[m4_popdef([AT_LOC_FIRST_LINE]) +m4_popdef([AT_LOC_FIRST_COLUMN]) +m4_popdef([AT_LOC_LAST_LINE]) +m4_popdef([AT_LOC_LAST_COLUMN])]) + + # AT_BISON_OPTION_PUSHDEFS([BISON-OPTIONS]) # ----------------------------------------- @@ -128,6 +147,15 @@ AT_PURE_LEX_IF( m4_pushdef([AT_LEX_PRE_FORMALS], []) m4_pushdef([AT_LEX_PRE_ARGS], []) ]) + +# Handle the different types of location components. + +AT_SKEL_CC_IF( + [AT_LOCATION_TYPE_IF( + [AT_LOC_PUSHDEF([begin.l], [begin.c], [end.l], [end.c])], + [AT_LOC_PUSHDEF([begin.line], [begin.column], [end.line], [end.column])])], + [AT_LOC_PUSHDEF([first_line], [first_column], [last_line], [last_column])]) + ])# _AT_BISON_OPTION_PUSHDEFS @@ -157,6 +185,7 @@ m4_popdef([AT_SKEL_CC_IF]) m4_popdef([AT_GLR_CC_IF]) m4_popdef([AT_LALR1_CC_IF]) m4_popdef([AT_DEFINES_IF]) +AT_LOC_POPDEF ])# AT_BISON_OPTION_POPDEFS