scripts/genksyms/lex.l
Source file repositories/reference/linux-study-clean/scripts/genksyms/lex.l
File Facts
- System
- Linux kernel
- Corpus path
scripts/genksyms/lex.l- Extension
.l- Size
- 8902 bytes
- Lines
- 450
- Domain
- Support Tooling And Documentation
- Bucket
- scripts
- Inferred role
- Support Tooling And Documentation: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
limits.hstdbool.hstdlib.hstring.hctype.hgenksyms.hparse.tab.hkeywords.c
Detected Declarations
function yylex
Annotated Snippet
if (!source_file) {
source_file = xstrdup(cur_filename);
in_source_file = 1;
} else {
in_source_file = (strcmp(cur_filename, source_file) == 0);
}
goto repeat;
}
switch (lexstate)
{
case ST_NORMAL:
APP;
switch (token)
{
case IDENT:
{
int r = is_reserved_word(yytext, yyleng);
if (r >= 0)
{
switch (token = r)
{
case ATTRIBUTE_KEYW:
lexstate = ST_ATTRIBUTE;
count = 0;
goto repeat;
case ASM_KEYW:
lexstate = ST_ASM;
count = 0;
goto repeat;
case TYPEOF_KEYW:
lexstate = ST_TYPEOF;
count = 0;
goto repeat;
case STRUCT_KEYW:
case UNION_KEYW:
case ENUM_KEYW:
dont_want_brace_phrase = 3;
suppress_type_lookup = 2;
goto fini;
case EXPORT_SYMBOL_KEYW:
goto fini;
case STATIC_ASSERT_KEYW:
lexstate = ST_STATIC_ASSERT;
count = 0;
goto repeat;
}
}
if (!suppress_type_lookup && !dont_want_type_specifier)
{
if (find_symbol(yytext, SYM_TYPEDEF, 1))
token = TYPE;
}
}
break;
case '[':
lexstate = ST_BRACKET;
count = 1;
goto repeat;
case '{':
if (dont_want_brace_phrase)
break;
lexstate = ST_BRACE;
count = 1;
Annotation
- Immediate include surface: `limits.h`, `stdbool.h`, `stdlib.h`, `string.h`, `ctype.h`, `genksyms.h`, `parse.tab.h`, `keywords.c`.
- Detected declarations: `function yylex`.
- Atlas domain: Support Tooling And Documentation / scripts.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.