View Issue Details

IDProjectCategoryView StatusLast Update
00019711003.1(2024)/Issue8Shell and Utilitiespublic2026-01-24 11:54
ReporterLove4Boobies Assigned To 
PrioritynormalSeverityEditorialTypeEnhancement Request
Status NewResolutionOpen 
NameBogdan Barbu
Organization
User Reference
Sectionlex
Page Numberhttps://pubs.opengroup.org/onlinepubs/9799919799/utilities/lex.html
Line NumberN/A
Interp Status
Final Accepted Text
Summary0001971: Changing lex prefixes
DescriptionThe yacc utility has a -p option that allows the use of a prefix other than the default "yy" - which is useful when linking multiple parsers in the same program/library. Alas, lex does not have a similar option even though they are supposed to be used together. This is an interface mismatch.
Desired Actionflex has a -P option that does exactly this, we might want to standardize it. I'm not sure whether implementations other than flex are realistically still in use today but I did look at the historical lex implementation, at IBM's and Heirloom's documentation for lex and a -P option would not be in conflict with these implementations.

As a side note, we should ideally also standardize the re-entrancy support found in flex/bison. This would allow programs to instantiate as many concurrent lexers and parsers as they want. The only standard way to do this today is to use arcane locking hacks.
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2026-01-24 11:54 Love4Boobies New Issue