# With a grammar, does precedence and associativity change the accepted language?

When parsing, certainly precedence and associativity effect the AST. But, do precedence and associativity alter the set of accepted sentences? In other words, can precedence and associativity be "ignored" (defined in some random precedence all associating left, say) in the grammar, and then the AST fixed later based on (possibly dynamic) precedence and associativity conditions?

I am concerned only with LL grammars and their common variants.

I don't know enough about LL parser generators to answer that question for any of them, but it's quite clear precedence declarations for Yacc-based parser generators which use the mechanism described in the Dragon book can affect the set of recognised sentences. First, most such precedence declarations include the "nonassoc" declaration, which specifies that a particular operator cannot be used in a way which might require associativity. For example, a language in which a < b < c is illegal might declare < to be nonassociative, thereby removing the illegal construct from the language.