mjijackson/citrus — Issue #37: Question about repetition of nested rules
Author: seeflanigan
Created: 2011-12-22 16:57:21+00:00
State: open

In trying to use the following rule

rule metadata_body
timestamp server_id end_pos word (space | number | ":")* "\n"
end

to parse the line

"#111215 10:45:17 server id 6001 end_log_pos 363693 Write_rows: table id 3694656 flags: STMT_END_F\n"

the call to #parse hangs indefinitely, making it seem like I've caused an infinite loop somewhere.

Being new to Citrus and rather new to PEGs altogether, I'm sure there's some foolish newbie mistake at play here.

What I'm trying to express is "match any word, space, number, or colon, up to the newline character."

Can someone point me toward A Better Way™?