In specific, I have a reasonably complicated trigger:
CREATE OR REPLACE TRIGGER db.triggerref
AFTER INSERT OR UPDATE OR DELETE
ON tableref
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
DECLARE
L_supplier SUPS.SUPPLIER%TYPE;
L_return BOOLEAN;
BEGIN
L_addr.ADDR_KEY := :new.ADDR_KEY;
END;I have an identifier token:
IDENTIFIER = <<[a-zA-Z_\$][a-zA-Z0-9_\$]+>>
And I'm trying to get everything into a single string, without bothering to write an entire PL/SQL grammar for Grammatica. Yeah, it would be great, but more work than I have time for. I tried creating a big token-like token
ORACLE_CODE_BLOCK = <<REFERENCING.*?END;>>
It keeps wanting to refere to REFERENCING as an IDENTIFIER instead of ORACLE_CODE BLOCK. The production is:
create_trigger
= CREATE [OR REPLACE] TRIGGER ref
(AFTER|BEFORE) trigger_op {OR trigger_op}
ON table_ref
ORACLE_CODE_BLOCK
;Am I doing something completely wrong?
Also, thanks for a great parser. I actually ended up making a Debian package out of it because I was using it so much. Had to use the 1.5 version just to get the case insensitive stuff.
Cheers!
_______________________________________________ Grammatica-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/grammatica-users
