At 06:27 -0500 2002/01/15, Anthony DeRobertis wrote: >But that's not the full story. I've posted it before, >but here it is again:
You wrote before: >I'm doing a grammar for HyperTalk in bison, which has a command that looks >takes a list of expressions, seperated by "or". An expression, however, can >contain "or" (it's an operator). The language isn't spec'd by me, so I don't >have the liberty of changing it. Do you understand you right, that you have not the actual HyperTalk grammar given, but try to fix it up, to your perception of the match the HyperTalk language? >answer_statement: ANSWER expr answer_btn_list > ... >answer_btn_list: WITH answer_btn_list_oneplus > | /* empty */ >answer_btn_list_oneplus: answer_btn_list_oneplus OR expr > | expr %prec PSEUDO_MAX >expr contains a lot of things, expr OR expr is one of them. This is what looks wrong to me: That both answer_btn_list_oneplus and expr contains OR. If the grammar was not given that way, I think that you may remove it from expr, adding instead perhaps expr -> "(" answer_btn_list_oneplus ")" The second point is that in order to avoid parsing conflicts in answer_statement, it should normally have a terminator: answer_statement -> ANSWER expr answer_btn_list "." This "." may actually be given implicitly in your language, by a newline, or writing in the statement into a box, or something. Hans Aberg _______________________________________________ Freecard-general mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freecard-general