Using TCLLk

Tcllk is an LL(k) parser generator

Tcllk is a variant of tcll1, an LL(1) parser generator. Like tcll1, tcllk produces LL(1) parsing tables. Unlike tcll1, it takes a more general grammar, indeed a grammar with about as much flexibility as such LALR(1) parser generators as yacc and bison.

The document TCLL1: An LL(1) Parser Generator and Parser gives the required information on grammar formats and interfacing to semantics.

Similarities to tcll1

Differences from tcll1

Briefly the differences are the following:

-f n sets number of repeated deep factorings permitted to n. The default is 3. A "deep factoring" involves factoring preceeded by replacing initial nonterminals by their right hand sides if necessary. The number of times this is done to a single production must be limited since the number of productions can grow exponentially and an infinite loop is possible. The -f option provides this limit.
-k n sets look-ahead depth to n. The default is 2. If the parser need to build a look-ahead tree, it limits the depth of the tree to the value specified by this parameter. The parser builds the look-ahead tree out of productions, and the number of productions created is exponential in the depth of the tree. Moreover, infinite look-ahead could be required.
-d uses default table for RHSs selected by largest set of terminals. If you don't use the default table, the parser will detect errors when it still can do more to recover from them. However, the parse tables will be larger.
-p prints grammar, both before and after transformation
-v sets verbose mode
-s writes out statistics at various points in the parser generation
-e prints grammar at the end, if any errors were detected