ragel
ragel copied to clipboard
[ragel] 'failed to parse output' during Rust generation
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
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.
We need to update the rust scanning in the frontend. Should be a quick fix.