ragel icon indicating copy to clipboard operation
ragel copied to clipboard

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

Open RazrFalcon opened this issue 5 years ago • 2 comments

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

RazrFalcon avatar Feb 15 '20 09:02 RazrFalcon

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.

rljacobson avatar Feb 20 '20 17:02 rljacobson

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

adrian-thurston avatar Mar 08 '20 17:03 adrian-thurston