drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.l
Source file repositories/reference/linux-study-clean/drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.l
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.l- Extension
.l- Size
- 4113 bytes
- Lines
- 154
- Domain
- Driver Families
- Bucket
- drivers/scsi
- Inferred role
- Driver Families: drivers/scsi
- Status
- atlas-only
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
Dependency Surface
sys/types.hinttypes.hlimits.hregex.hstdio.hstring.hsysexits.h../queue.haicasm.haicasm_symbol.haicasm_macro_gram.h
Detected Declarations
function mmwrap
Annotated Snippet
if (parren_count == 1) {
string_buf_ptr = string_buf;
return ('(');
}
*string_buf_ptr++ = '(';
}
<ARGLIST>\) {
if (parren_count == 1) {
if (string_buf_ptr != string_buf) {
/*
* Return an argument and
* rescan this parren so we
* can return it as well.
*/
*string_buf_ptr = '\0';
mmlval.str = string_buf;
string_buf_ptr = string_buf;
unput(')');
return T_ARG;
}
BEGIN INITIAL;
return (')');
}
parren_count--;
*string_buf_ptr++ = ')';
}
<ARGLIST>{MCARG} {
char *yptr;
yptr = mmtext;
while (*yptr)
*string_buf_ptr++ = *yptr++;
}
<ARGLIST>\, {
if (string_buf_ptr != string_buf) {
/*
* Return an argument and
* rescan this comma so we
* can return it as well.
*/
*string_buf_ptr = '\0';
mmlval.str = string_buf;
string_buf_ptr = string_buf;
unput(',');
return T_ARG;
}
return ',';
}
{WORD}[(] {
/* May be a symbol or a macro invocation. */
mmlval.sym = symtable_get(mmtext);
if (mmlval.sym->type != MACRO) {
stop("Expecting Macro Name",
EX_DATAERR);
}
unput('(');
parren_count = 0;
BEGIN ARGLIST;
return T_SYMBOL;
}
. {
snprintf(buf, sizeof(buf), "Invalid character "
"'%c'", mmtext[0]);
stop(buf, EX_DATAERR);
}
%%
int
mmwrap()
{
Annotation
- Immediate include surface: `sys/types.h`, `inttypes.h`, `limits.h`, `regex.h`, `stdio.h`, `string.h`, `sysexits.h`, `../queue.h`.
- Detected declarations: `function mmwrap`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: atlas-only.
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.