From 81dc56b31283473bd85cf80aff2be6d692927b99 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Thu, 4 Mar 2021 09:49:52 -0800 Subject: [PATCH] [executable semantics] Trivial lexer cleanup (#341) - turn off unneeded legacy flex parts. - a couple of comments --- executable_semantics/syntax.lpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/executable_semantics/syntax.lpp b/executable_semantics/syntax.lpp index 2384cb644ecc..3807195c78e9 100644 --- a/executable_semantics/syntax.lpp +++ b/executable_semantics/syntax.lpp @@ -8,6 +8,13 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include #include "executable_semantics/syntax.tab.h" %} + +/* Turn off legacy bits we don't need */ +%option noyywrap nounput nodefault noinput + +/* maintains the number of the current line read from input in the + global variable yylineno. +*/ %option yylineno AND "and" @@ -86,5 +93,3 @@ integer_literal [0-9]+ . { return yytext[0]; } %% - -int yywrap() { return 1; }