Yes, we will try to support all of them. I also thought of index range, but that is a bit too complicated. Instead, I like to add a "multiple" key word to indicate that there are multiple matches for that UI template. The difference between "any" and "multiple" is that the former one is a single match with position not fixed.
BTW, a lot of the key words such as "first" and "last" need to be implemented at the Engine side. Users may have to move to Tellurium New APIs for the new features. Guys, if you haven't started to convert your project to 0.7.0, I really suggest you start that as early as possible. A lot of advanced features will only be available to the new Tellurium Engine. Thanks, Jian On Fri, Feb 19, 2010 at 12:52 PM, 刘蒙 <[email protected]> wrote: > For the index, does it mean that we can use 'all' , 'odd', 'even', 'any', > 'first', and 'last'? > > That is really cool. > > 2010/2/18 John <[email protected]> > > Alright, here is the first draft of the UDL grammars using Antlr >> expressions. >> >> Any comments and suggestions are welcome. Don't miss your chance to >> shape >> UDL. >> >> >> ----------------------------------------------------------------------------------------- >> grammar Udl; >> >> uid >> : baseUid >> | listUid >> | tableUid >> ; >> >> baseUid >> : ID >> ; >> >> listUid >> : '{' INDEX '}' 'as' ID >> ; >> >> tableUid >> : tableHeaderUid >> | tableFooterUid >> | tableBodyUid >> ; >> >> tableHeaderUid >> : '{' 'header' ':' INDEX '}' 'as' ID >> ; >> >> tableFooterUid >> : '{' 'footer' ':' INDEX '}' 'as' ID >> ; >> >> tableBodyUid >> : '{' 'row' ':' INDEX ',' 'column' ':' INDEX '}' 'as' ID >> | '{' 'row' '=' ID ',' 'column' ':' INDEX '}' 'as' ID >> | '{' 'row' ':' INDEX ',' 'column' '=' ID '}' 'as' ID >> | '{' 'row' '=' ID ',' 'column' '=' ID '}' 'as' ID >> | '{' 'tbody' ':' INDEX ',' 'row' ':' INDEX ',' 'column' >> ':' INDEX '}' 'as' ID >> | '{' 'tbody' ':' INDEX ',' 'row' '=' ID ',' 'column' ':' >> INDEX '}' 'as' ID >> | '{' 'tbody' ':' INDEX ',' 'row' ':' INDEX ',' 'column' >> '=' ID '}' 'as' ID >> | '{' 'tbody' ':' INDEX ',' 'row' '=' id1=ID ',' 'column' '=' >> ID '}' 'as' ID >> ; >> >> fragment LETTER : ('a'..'z' | 'A'..'Z') ; >> fragment DIGIT : '0'..'9'; >> INDEX : (DIGIT+ |'all' | 'odd' | 'even' | 'any' | 'first' | >> 'last' ); >> ID : LETTER (LETTER | DIGIT)*; >> WS : (' ' | '\t' | '\n' | '\r' | '\f')+ {$channel = HIDDEN;}; >> >> ------------------------------------------------------------------------------------------------- >> >> On Feb 18, 4:37 pm, Jian Fang <[email protected]> wrote: >> > If no objections, I would like to use the following format for table >> body: >> > >> > "{tbody : 1, row : 2, column : 3} as Search" >> > >> > and >> > >> > "{tbody : 1, row = 2, column = bad} as Search" >> > >> > where the ":" defines a value and "=" is a reference to other id, for >> > instance, header column id, then >> > Tellurium will try to handle the case that the column keeps changing >> when a >> > user drags the column around. >> > >> > On Thu, Feb 18, 2010 at 1:00 PM, Jian Fang <[email protected]> >> wrote: >> > > Hi, >> > >> > > I start to work on the UID description language (UDL). One goal is to >> add >> > > name reference for UI elements in a List or Table. >> > >> > > I could have the following formats, where assume Search is name that >> you >> > > could reference the element. >> > >> > > "Search as tbody: 1, row:1, column:4" >> > > "Search as ( tbody: 1, row:1, column:4)" >> > > "Search as {tbody: 1, row:1, column:4}" >> > >> > > or >> > >> > > "tbody: 1, row:1, column:4 as Search" >> > > "(tbody: 1, row:1, column:4) as Search" >> > > "{tbody: 1, row:1, column:4}" as Search" >> > >> > > Any preference or even better suggestions? >> > >> > > Thanks, >> > >> > > Jian >> >> -- >> You received this message because you are subscribed to the Google Groups >> "tellurium-users" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<tellurium-users%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/tellurium-users?hl=en. >> >> > -- > You received this message because you are subscribed to the Google Groups > "tellurium-users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<tellurium-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/tellurium-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "tellurium-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tellurium-users?hl=en.
