1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
| # Copyright (c) 2022-2026, PostgreSQL Global Development Group
|
| backend_sources += files(
| 'analyze.c',
| 'parse_agg.c',
| 'parse_clause.c',
| 'parse_coerce.c',
| 'parse_collate.c',
| 'parse_cte.c',
| 'parse_enr.c',
| 'parse_expr.c',
| 'parse_func.c',
| 'parse_jsontable.c',
| 'parse_merge.c',
| 'parse_node.c',
| 'parse_oper.c',
| 'parse_param.c',
| 'parse_relation.c',
| 'parse_target.c',
| 'parse_type.c',
| 'parse_utilcmd.c',
| 'scansup.c',
| )
|
| # Build a small utility static lib for the parser. The generation of the
| # parser is slow, and building this separately avoids other parts of the
| # backend having to wait till gram.h is generated.
| parser_sources = files('parser.c')
|
| backend_scanner = custom_target('scan',
| input: 'scan.l',
| output: 'scan.c',
| command: [flex_cmd, '--no-backup', '--', '-CF', '-p', '-p'],
| )
| generated_sources += backend_scanner
| parser_sources += backend_scanner
|
| backend_parser = custom_target('gram',
| input: 'gram.y',
| kwargs: bison_kw,
| )
| generated_sources += backend_parser.to_list()
| parser_sources += backend_parser
|
| parser = static_library('parser',
| parser_sources,
| dependencies: [backend_code],
| include_directories: include_directories('.'),
| kwargs: internal_lib_args,
| )
| backend_link_with += parser
|
|