Annotation of Amaya/amaya/Template.S, revision 1.9
1.7 francesc 1: { Structure Schema for XTiger Templates
2: Francesc Campoy Flores 31/03/2006 }
1.1 tollenae 3:
4:
5: STRUCTURE Template;
6:
7: DEFPRES TemplateP;
8:
9: ATTR
1.7 francesc 10: { generic attributes for internal use }
11: Unknown_attribute = TEXT; { to store an unknown attribute }
1.1 tollenae 12:
13: CONST
14:
1.7 francesc 15: C_CR = '\12';
1.1 tollenae 16:
17: STRUCT
18:
1.9 ! vatton 19: Template {Virtual} = CASE OF
! 20: head;
! 21: repeat;
! 22: option;
! 23: useEl;
! 24: bag;
! 25: attribute;
! 26: END;
1.7 francesc 27:
28: head = LIST OF (
29: Declaration = CASE OF
30: component;
31: union;
32: import;
33: END
34: );
35:
36: component (ATTR name = TEXT) = ANY - (head, union, import);
1.8 quint 37: union (ATTR name; includeAt = TEXT; exclude = TEXT) = CONSTANT C_CR; {It is always empty}
1.9 ! vatton 38: import (ATTR src = TEXT) = CONSTANT C_CR; {It is always empty}
1.7 francesc 39:
1.9 ! vatton 40: Model = CASE OF
! 41: component;
! 42: useEl;
! 43: bag;
! 44: ANY;
! 45: END - (head, union, import, repeat, option);
1.7 francesc 46:
47: repeat (ATTR minOcc = INTEGER; maxOcc = INTEGER) = BEGIN
48: RepeatContent = CASE OF
1.9 ! vatton 49: Model;
1.7 francesc 50: Repetitions = LIST OF (useEl);
51: END;
1.9 ! vatton 52: END;
! 53:
! 54: option = BEGIN
! 55: Model;
! 56: END;
1.7 francesc 57:
1.9 ! vatton 58: useEl (ATTR id = TEXT; types = TEXT; currentType = TEXT)
! 59: = BEGIN
! 60: useMenu;
! 61: ANY;
! 62: END - (head, union, import, component);
1.7 francesc 63:
64: useMenu = CONSTANT C_CR; {Just a button}
65:
66: bag (ATTR id; types) = ANY - (head, union, import, component);
67:
68: attribute (ATTR
69: name;
70: type = TEXT;
71: useAt = TEXT;
72: valueAt = TEXT;
1.8 quint 73: fixed = true, false) = CONSTANT C_CR; {It is always empty}
1.7 francesc 74:
75: EXCEPT
76: {Hiding unkown and language attributes}
77: Unknown_attribute: Invisible;
78: Language: Invisible;
1.1 tollenae 79:
1.7 francesc 80: {The use button is not editable}
81: useMenu : NoCut, NoCreate, NoMove, NoResize, NoSelect;
1.1 tollenae 82:
83: END
Webmaster