Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ragel] 'failed to parse output' during Rust generation #3

Open
RazrFalcon opened this issue Feb 15, 2020 · 2 comments
Open

[ragel] 'failed to parse output' during Rust generation #3

RazrFalcon opened this issue Feb 15, 2020 · 2 comments
Assignees

Comments

@RazrFalcon
Copy link

Input file: https://github.com/harfbuzz/harfbuzz/blob/master/src/hb-ot-shape-complex-use-machine.rl

alphtype set to u8

ragel 5f9ebc9

> ./ragel-rust hb-ot-shape-complex-use-machine.rl 
failed to parse output: <text2>:21:39: parse error

@rljacobson
Copy link

rljacobson commented Feb 20, 2020

I am getting the same error. In my case, I believe it has something to do with mismatched single quotes, even if those quotes play completely different syntactic roles. Here's a minimal example:

/*
Delete the quote-containing comment inside the struct and it succeeds.
Delete the lifetime annotation instead and it succeeds. Replace the comment
with something containing a lifetime annotation and it fails. Etc.
*/

struct MyStruct<'a>{
    // The mismatched quote is the problem. Commenting it out doesn't matter.
}

fn main() {
    println!("Hello, world!");
}

(Giving a proper Ragel state machine definition in the example doesn't change the outcome.)

My issue might be distinct from @RazrFalcon, as his code doesn't contain lifetime annotations or mismatched quotes.

@adrian-thurston adrian-thurston transferred this issue from adrian-thurston/colm Mar 7, 2020
@adrian-thurston
Copy link
Owner

We need to update the rust scanning in the frontend. Should be a quick fix.

@adrian-thurston adrian-thurston self-assigned this Dec 3, 2021
adrian-thurston added a commit to adrian-thurston/colm that referenced this issue Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants