Template = NamespaceDeclaration TemplateElements;
NamespaceDeclaration = AnyCharacterExceptBackslash "{namespace" NamespaceIdentifier "=" ComponentName "}" /** TODO - PRELIMINARY NAMESPACE DECLARATION **/

TemplateElements = { TemplateElement };
TemplateElement = TemplateTag | InlineElement | Text;

TemplateTag = "<" HelperName HelperAttributes ( "/>" | ">" TemplateElements "</" HelperName ">" );
HelperName = NamespaceIdentifier ":" { NamespaceIdentifier ":" } HelperMethodName;
HelperAttributes = { HelperAttribute };
HelperAttribute = [ NamespaceIdentifier ":" ] AttributeName "=" Quote AttributeContents Quote |  ; <!-- Quote == Quote -->


InlineElement = "{" ( ObjectGetters | HelperName  "(" ShorthandArguments ")" ) "}";
ShorthandArguments = [ Quote EscapedUnicodeCharacter Quote [ "," ] ] HelperAttributes;


NamespacePrefix = Character { CharacterOrDigit };
HelperMethodName = Character { CharacterOrDigit };


AttributeContents = { AttributeCharacter };


ObjectGetters = ObjectIdentifier { "." ObjectIdentifier };



Text = ? alles, was nicht Tags sind. ?



NamespaceIdentifier = Identifier;
AttributeName = Identifier;
AnyCharacterExceptBackslash = ? Any character without the \. ?
ObjectIdentifier = Identifier;
Identifier = Character { CharacterOrDigit };
ComponentName = Character { "::" CharacterOrDigit } { CharacterOrDigit }; /* TODO - DOES THIS MAKE SENSE??? */

CharacterOrDigit = Character | Digit;
UnicodeCharacter = ? All Unicode characters, except line break ?;
EscapedUnicodeCharacter = ? All Unicode characters, except line break. Double quote must be escaped when enclosed in double quotes, single quote must be escaped, when enclosed in single quotes, backslash and dollar sign must always be escaped. Escape character is the backslash ?;
UpperCaseCharacter = ? Character, but only upper case ?;
Attribute = ? all unicode characters, except line break, ">", "<" ?;
Character = ? All lower- and uppercase characters between "a" and "z" ?;
Digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
LineBreak = "\n";
DoubleQuote = '"';
SingleQuote = "'";



<!-- GOOD EXAMPLE -->
idList = array(1,2,3,4,5,6);

<f:for each="1 2 3 4 5 6" as="i">
</f:for>

<f:for each="{f:for('{a} ', each='{idList}', as='a')}" as="i">
</f:for>

{f:for('{a} ', each='{idList}', as='a')}

<f:for each="{idList}" as="a">{a} </f:for>





{f:for "hallo" each="bla" as="a"}
{f:actionLink action="bla"}
{f:actionLink(action="bla")}


