Verify LL(1) grammar with ANTLR
问题 I understand that ANTLR can accept an LL(*) grammar. But, is there any way to check a grammar whether it is an LL(1) or not using ANTLR? 回答1: options { k = 1; } It will give a warning if your grammer is not in LL(1). 回答2: For a grammer/language to be LL(1) we know that at any given position in the input there is only one production we can take to consume token(s) of the input. So, in order to determine if a grammar is LL(1), we need to: 1) check the FIRST set of all nonterminals and if there