dcsimg
HiLog and higher-order syntax
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Martin_Osborne
Posted On:   Thursday, May 6, 2004 10:29 AM

I'm trying to parse the Flora-2 grammar and can't figure out to deal with the heavy recursion caused by the higher-order syntax. Either I've missed a simple re-write technique, it is a context-sensitive grammar and requires heavy use of semantic predicates or it requires a bottom up technique. Given the extract of the grammar below, I would appreciate any advice on what my best plan of attack is! BinaryRelationship := PathExpression ':' PathExpression BinaryRelationship := PathExpression '::' PathExpression ObjectSpecification := PathExpression '[' SpecBody ']' SpecBody := 'tnot' MethodSpecification SpecBody := SpecBody ',' SpecBody Spec   More>>

I'm trying to parse the Flora-2 grammar and can't figure out to deal with the heavy recursion caused by the higher-order syntax. Either I've missed a simple re-write technique, it is a context-sensitive grammar and requires heavy use of semantic predicates or it requires a bottom up technique. Given the extract of the grammar below, I would appreciate any advice on what my best plan of attack is!


BinaryRelationship := PathExpression ':' PathExpression

BinaryRelationship := PathExpression '::' PathExpression

ObjectSpecification := PathExpression '[' SpecBody ']'

SpecBody := 'tnot' MethodSpecification

SpecBody := SpecBody ',' SpecBody

SpecBody := SpecBody ';' SpecBody

MethodSpecification := ('#' | '*')? Term

MethodSpecification := PathExpression ValueReferenceConnective PathExpression

ValueReferenceConnective:= '->' | '->>' | '*->' | '*->>' | '=>' | '=>>'

PathExpression := atom | number | string | variable | specialOidToken

PathExpression := Term | List | ReifiedFormula

PathExpression := PathExpression PathExpressionConnective PathExpression

PathExpression := BinaryRelationship

PathExpression := ObjectSpecification

PathExpression := Aggregate

PathExpressionConnective:= '.' | '..' | '!' | '!!'

specialOidToken := anonymousOid | numberedOid | thisModuleName

ReifiedFormula := ${Body}


anonymousOid := _#

numberedOid := _#integer

thisModuleName := _@

List := '[' PathExpression (',' PathExpression)* ('|' PathExpression
)? ']'

Term := Functor '(' Arguments ')'

Functor := PathExpression

Arguments := PathExpression (',' PathExpression)*o

   <<Less
About | Sitemap | Contact