MAJOR=4 MINOR=22 DEVNAME=tty22 #ˆl–Ü4ý(”Ò~ê�ÆŸ¸Ó*bÑ¿Á „dÀ¿)ê -*- Autoconf -*- # D language support for Bison # Copyright (C) 2018-2020 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # _b4_comment(TEXT, OPEN, CONTINUE, END) # -------------------------------------- # Put TEXT in comment. Avoid trailing spaces: don't indent empty lines. # Avoid adding indentation to the first line, as the indentation comes # from OPEN. That's why we don't patsubst([$1], [^\(.\)], [ \1]). # # Prefix all the output lines with PREFIX. m4_define([_b4_comment], [$2[]m4_bpatsubst(m4_expand([[$1]]), [ \(.\)], [ $3\1])$4]) # b4_comment(TEXT, [PREFIX]) # -------------------------- # Put TEXT in comment. Prefix all the output lines with PREFIX. m4_define([b4_comment], [_b4_comment([$1], [$2/* ], [$2 ], [ */])]) # b4_sync_start(LINE, FILE) # ------------------------- m4_define([b4_sync_start], [[#]line $1 $2]) # b4_list2(LIST1, LIST2) # ---------------------- # Join two lists with a comma if necessary. m4_define([b4_list2], [$1[]m4_ifval(m4_quote($1), [m4_ifval(m4_quote($2), [[, ]])])[]$2]) # b4_percent_define_get3(DEF, PRE, POST, NOT) # ------------------------------------------- # Expand to the value of DEF surrounded by PRE and POST if it's %define'ed, # otherwise NOT. m4_define([b4_percent_define_get3], [m4_ifval(m4_quote(b4_percent_define_get([$1])), [$2[]b4_percent_define_get([$1])[]$3], [$4])]) # b4_flag_value(BOOLEAN-FLAG) # --------------------------- m4_define([b4_flag_value], [b4_flag_if([$1], [true], [false])]) # b4_parser_class_declaration # --------------------------- # The declaration of the parser class ("class YYParser"), with all its # qualifiers/annotations. b4_percent_define_default([[api.parser.abstract]], [[false]]) b4_percent_define_default([[api.parser.final]], [[false]]) b4_percent_define_default([[api.parser.public]], [[false]]) m4_define([b4_parser_class_declaration], [b4_percent_define_get3([api.parser.annotations], [], [ ])dnl b4_percent_define_flag_if([api.parser.public], [public ])dnl b4_percent_define_flag_if([api.parser.abstract], [abstract ])dnl b4_percent_define_flag_if([api.parser.final], [final ])dnl [class ]b4_parser_class[]dnl b4_percent_define_get3([api.parser.extends], [ extends ])dnl b4_percent_define_get3([api.parser.implements], [ implements ])]) # b4_lexer_if(TRUE, FALSE) # ------------------------ m4_define([b4_lexer_if], [b4_percent_code_ifdef([[lexer]], [$1], [$2])]) # b4_position_type_if(TRUE, FALSE) # -------------------------------- m4_define([b4_position_type_if], [b4_percent_define_ifdef([[position_type]], [$1], [$2])]) # b4_location_type_if(TRUE, FALSE) # -------------------------------- m4_define([b4_location_type_if], [b4_percent_define_ifdef([[location_type]], [$1], [$2])]) # b4_identification # ----------------- m4_define([b4_identification], [[/** Version number for the Bison executable that generated this parser. */ public static immutable string yy_bison_version = "]b4_version_string["; /** Name of the skeleton that generated this parser. */ public static immutable string yy_bison_skeleton = ]b4_skeleton[; ]]) ## ------------ ## ## Data types. ## ## ------------ ## # b4_int_type(MIN, MAX) # --------------------- # Return the smallest int type able to handle numbers ranging from # MIN to MAX (included). m4_define(