|
|
| Reporter | Love4Boobies | Assigned To | | |
|---|
| Priority | normal | Severity | Editorial | Type | Enhancement Request |
|---|
| Status | New | Resolution | Open | |
|---|
|
|
| Name | Bogdan Barbu |
|---|
| Organization | |
|---|
| User Reference | |
|---|
| Section | lex |
|---|
| Page Number | https://pubs.opengroup.org/onlinepubs/9799919799/utilities/lex.html |
|---|
| Line Number | N/A |
|---|
| Interp Status | |
|---|
| Final Accepted Text | |
|---|
|
|
|
|
| Summary | 0001971: Changing lex prefixes |
|---|
| Description | The 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 Action | flex 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. |
|---|
| Tags | No tags attached. |
|---|