Sam Harwell schrieb: > Both problems are solved when the file was resaved with \n line endings. > Previously they were inconsistent (probably a mix of \r\n and \n endings. > > Sam
I thought, Ter did change all occurrences of \r\n, \r and \n endings that they can appear in any order. Johannes > > > > *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > *On Behalf Of *Sam Harwell > *Sent:* Tuesday, October 14, 2008 11:52 AM > *To:* ANTLR-dev Dev > *Subject:* [antlr-dev] Bugs in dynamic attribute scope > > > > I know these were working at some point in the recent past, but I just > rebuilt the grammar and found they don’t compile. > > > > The following causes 2 compile errors: > > > > rule_name > > scope > > { > > //int _is_float; > > > > // index of the first token that is not part of this seq > > // note that this means you need a >= instead of > in the > CanMatch____ semantic predicates' > > // check for whether a token can belong in this sequence. > > int _last_specifier; > > } > > @init > > { > > $rule_name::_last_specifier = -1; > > } > > > > Here are the two errors: > > > > 1. The grammar itself won’t compile; the antlr tool returns > error 141: unknown dynamically-scoped attribute for scope rule_name: > _last_specifier > > 2. If you move int _last_specifier; above the line starting with > // index, then the grammar compiles, but you find the following line in > the generated code, causing it to not compile: > protected internal //int _is_float; > > > > Sam > > > ------------------------------------------------------------------------ > > _______________________________________________ > antlr-dev mailing list > [email protected] > http://www.antlr.org:8080/mailman/listinfo/antlr-dev _______________________________________________ antlr-dev mailing list [email protected] http://www.antlr.org:8080/mailman/listinfo/antlr-dev
