Reg

class Reg[A]

This class is used to index registers within the mutable state. Currently, there are only 4 available registers, so use them wisely!

This class is used to index registers within the mutable state. Currently, there are only 4 available registers, so use them wisely!

If you need more than four registers but know that they will be used at different times you can rename your register, as long as they point to the same reference. You may find the Parsley[A].cast[B: ClassTag]: Parsley[B] combinator useful to change the type of a Reg[Any].

Since

2.2.0

Note

It is undefined behaviour to use a register in multiple different independent parsers. You should be careful to parameterise the registers in shared parsers and allocate fresh ones for each "top-level" parser you will run.

Companion
object
class Object
trait Matchable
class Any