Skip to content

token length incorrect using --latin1 option #63

Closed
@chrismshelton

Description

@chrismshelton

The template files assume UTF-8 in the alex_scan_tkn function, even when the --latin1 option is given.

In templates/GenericTemplate.hs:

alex_scan_tkn user orig_input (if c < 0x80 || c >= 0xC0 then PLUS(len,ILIT(1)) else len)

This leads to an incorrect length being given to the lexer actions for tokens containing bytes between 0x80 and 0xC0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions