diff options
Diffstat (limited to 'test cases/frameworks/8 flex/meson.build')
| -rw-r--r-- | test cases/frameworks/8 flex/meson.build | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/test cases/frameworks/8 flex/meson.build b/test cases/frameworks/8 flex/meson.build index 55b96dda7..070036072 100644 --- a/test cases/frameworks/8 flex/meson.build +++ b/test cases/frameworks/8 flex/meson.build @@ -1,10 +1,15 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright © 2024-2025 Intel Corporation + project('flex and bison', 'c') # The point of this test is that one generator # may output headers that are necessary to build # the sources of a different generator. -flex = find_program('flex', required: false) +# TODO: handle win_flex/win_bison + +flex = find_program('reflex', 'flex', 'lex', required: false) bison = find_program('bison', required: false) if not flex.found() @@ -15,11 +20,9 @@ if not bison.found() error('MESON_SKIP_TEST bison not found.') endif -lgen = generator(flex, -output : '@PLAINNAME@.yy.c', -arguments : ['-o', '@OUTPUT@', '@INPUT@']) - -lfiles = lgen.process('lexer.l') +codegen = import('unstable-codegen') +lex = codegen.lex(implementations : ['flex', 'reflex', 'lex']) +lfiles = lex.generate('lexer.l') pgen = generator(bison, output : ['@BASENAME@.tab.c', '@BASENAME@.tab.h'], @@ -27,10 +30,11 @@ arguments : ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@']) pfiles = pgen.process('parser.y') -e = executable('pgen', 'prog.c', - lfiles, - pfiles, - override_options: 'unity=off') +e = executable( + 'pgen', + 'prog.c', lfiles, pfiles, + override_options : ['unity=off'], +) test('parsertest', e, args: [meson.current_source_dir() / 'testfile']) |
