skaller wrote: > Part 0: Introduction. > ********************* > > Felix has a rather complex expression grammar. It has a limited ability > to add new infix operators of a fixed precedence (although the > preprocessor directive appears to permit a choice of precedence level). > > Now we have the extensible GLR parser available, it is time to > consider redesiging the expression grammar. > > There are several aspects. First, we need to partition the > grammar between the compiler and the library. > > Second, we need to devise a way to specify semantic actions > which is better than the large number of hard coded ad hoc > terms currently supported in the compiler. > > I want to begin discussion how we should make the new grammar > and extension system look, so please comment! Vent your > pet hates and complaints, make constructive and useless > suggestions, be prepared for controversy, be willing to make > radical suggestions! >
Are you looking for tweaks to the grammar that can parse the same syntax, or are you also considering changing the syntax and semantics to make things simpler? > setunion: > | user10 VBARVBAR setunion_list > | user10 > > setunion_list: > | user10 VBARVBAR setunion_list > | user10 > > user10: > | user10 USER10 setintersection > | setintersection > > setintersection: > | arrow AMPERAMPER setintersection_list > | arrow > > setintersection_list: > | arrow AMPERAMPER setintersection_list > | arrow > As a curiousity, can we define a function that can use this sugar for set functions? Oh, and why is user10 named user10? > factor: > | hash_name > | factor DOT LSQB expr RSQB > | factor DOT LSQB expr TO expr RSQB > | factor DOT LSQB expr TO RSQB > | factor DOT LSQB TO expr RSQB > | factor DOT simple_name_parts > | factor DOTRIGHTARROW simple_name_parts > | factor DOT LPAR INTEGER RPAR > > hash_name: > | HASH hash_name > | the_name > What's hash_name in this structure? ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language