Skip to content

Trailing context consumed if initial expression matches it #165

Description

@jefftrull

I am finding that expressions of the form
X / Y
result in YYCURSOR pointing after Y instead of after X, i.e., the trailing context is consumed - if Y can also be matched by X.

In the attached example there are two expressions to be matched. In the first, any number of "a" or "b" characters followed by a final "b":

[ab]* / "b"

In the second, any number of "c" followed by a final "d":

[c]* / "d"

I find that, in the first example, matches result in YYCURSOR pointing past the final "b", which is the trailing context. In the second example, matches result in YYCURSOR pointing, correctly, at the final "d".
re2c_testcase.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions