From: Robert L. <rle...@us...> - 2007-02-23 14:15:41
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/parser/assembly In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv9857/src/ccmtools/parser/assembly Modified Files: assembly.flex bnf.txt assembly.cup Log Message: using alias names for inner components Index: assembly.cup =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/parser/assembly/assembly.cup,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** assembly.cup 14 Feb 2007 12:27:06 -0000 1.3 --- assembly.cup 23 Feb 2007 14:15:33 -0000 1.4 *************** *** 41,45 **** ! terminal ASSEMBLY, ATTRIBUTE; terminal COMPONENT, CONNECT, CONSTANT; terminal IMPLEMENTS, MODULE, THIS, TO; --- 41,45 ---- ! terminal ALIAS, ASSEMBLY, ATTRIBUTE; terminal COMPONENT, CONNECT, CONSTANT; terminal IMPLEMENTS, MODULE, THIS, TO; *************** *** 162,165 **** --- 162,170 ---- :} | + COMPONENT qualified_name:v1 ALIAS STRING:v3 NAME:v2 SEMICOLON + {: + RESULT = new ccmtools.parser.assembly.metamodel.Component(v1, v2, v3); + :} + | CONNECT port:v1 TO port:v2 SEMICOLON {: Index: bnf.txt =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/parser/assembly/bnf.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** bnf.txt 12 Feb 2007 14:08:31 -0000 1.3 --- bnf.txt 23 Feb 2007 14:15:33 -0000 1.4 *************** *** 9,17 **** module := "module" NAME "{" (model_element)* "}" ";" ! assembly := "assembly" NAME "implements" QN "{" (assembly_element)* "}" ";" assembly_element := component | connection | attribute | constant ! component := "component" QN NAME ";" connection := "connect" port "to" port ";" --- 9,17 ---- module := "module" NAME "{" (model_element)* "}" ";" ! assembly := "assembly" (NAME)? "implements" NAME "{" (assembly_element)* "}" ";" assembly_element := component | connection | attribute | constant ! component := "component" QN ("alias" STRING)? NAME ";" connection := "connect" port "to" port ";" *************** *** 26,30 **** attribute := "attribute" internal_port "=" external_port ";" ! constant := "constant" internal_port "=" TEXT ";" --- 26,32 ---- attribute := "attribute" internal_port "=" external_port ";" ! constant := "constant" internal_port "=" value ";" ! ! value := STRING | NUMBER Index: assembly.flex =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/parser/assembly/assembly.flex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** assembly.flex 23 Feb 2007 09:58:38 -0000 1.4 --- assembly.flex 23 Feb 2007 14:15:33 -0000 1.5 *************** *** 77,80 **** --- 77,81 ---- { /* reserved words */ + "alias" { return symbol(sym.ALIAS); } "assembly" { return symbol(sym.ASSEMBLY); } "attribute" { return symbol(sym.ATTRIBUTE); } |