Property Grammars: a Flexible Constraint-Based Approach to Parsing