X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fplugins%2Fctf%2Fcommon%2Fmetadata%2Flexer.l;h=849d016bc820364b690ec1831a3c906848525489;hp=d0695c6b12e6fafc85555fecbc5c2487f9199278;hb=50f6fce8d00bc6b70a814a0be3b71570fb65d070;hpb=994cd345db7a82957ce647c2dac28cae11382dcc diff --git a/src/plugins/ctf/common/metadata/lexer.l b/src/plugins/ctf/common/metadata/lexer.l index d0695c6b..849d016b 100644 --- a/src/plugins/ctf/common/metadata/lexer.l +++ b/src/plugins/ctf/common/metadata/lexer.l @@ -1,28 +1,10 @@ %{ /* - * lexer.l + * SPDX-License-Identifier: MIT * - * Common Trace Formal Lexer - * - * Copyright 2010 - Mathieu Desnoyers - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Copyright 2010 Mathieu Desnoyers * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * Common Trace Formal Lexer */ #define BT_LOG_OUTPUT_LEVEL ctf_plugin_metadata_log_level @@ -42,7 +24,7 @@ errno = 0; \ yylval->ull = strtoull(yytext, NULL, base); \ if (errno) { \ - _BT_LOGE_LINENO(yylineno, \ + _BT_LOGE_APPEND_CAUSE_LINENO(yylineno, \ "Cannot parser constant integer: " \ "base=%d, text=\"%s\"", base, yytext); \ return CTF_ERROR; \ @@ -134,5 +116,5 @@ _Imaginary setstring(yyextra, yylval, yytext); return CTF_IMAGINARY; {IDENTIFIER} BT_LOGT("Got identifier: id=\"%s\"", yytext); setstring(yyextra, yylval, yytext); if (is_type(yyextra, yytext)) return ID_TYPE; else return IDENTIFIER; [ \t\r\n] ; /* ignore */ -. _BT_LOGE_LINENO(yylineno, "Invalid character: char=\"%c\", val=0x%02x", isprint((unsigned char) yytext[0]) ? yytext[0] : '\0', yytext[0]); return CTF_ERROR; +. _BT_LOGE_APPEND_CAUSE_LINENO(yylineno, "Invalid character: char=\"%c\", val=0x%02x", isprint((unsigned char) yytext[0]) ? yytext[0] : '\0', yytext[0]); return CTF_ERROR; %%