BNF for ParseCpsl.jj
NON-TERMINALS
//////////////
// the grammar
//////////////
// MultiPhaseTransducer
// SinglePhaseTransducer
// Rule
// MacroDef
// LeftHandSide
// we pass the lhs down so we can add bindings in CPEs, and the cg
// so we can add PEs and create disjunctions here
// ConstraintGroup
// PatternElement
// BasicPatternElement
// ComplexPatternElement
Constraint
Constraint |
::= |
( <pling> )? <ident> ( <period> <ident> <equals> AttrVal )? |
// Constraint
// attribute values: strings, identifers (=strings), integers, floats,
// booleans
AttrVal
AttrVal |
::= |
( <string> | <ident> | <integer> | <floatingPoint> | <bool> ) |
// RightHandSide
// actions return 2 strings, one for the name of the block, and
// one for the block itself. if the name is null, it is an anonymous block
// Action
// NamedJavaBlock
// AnonymousJavaBlock
AssignmentExpression
AssignmentExpression |
::= |
( <colon> | <colonplus> ) <ident> <period> <ident> <assign> <leftBrace> ( <ident> <assign> ( AttrVal | ( <colon> <ident> <period> <ident> <period> <ident> ) ) ( <comma> )? )* <rightBrace> |
// AssignmentExpression