Table-driven lexers in Engineering a Compiler 2nd Edition

Recently, I am reading Engineering a Compiler 2nd Edition.

But I am struggling to understand the following pseudocode.

enter image description here

Can anyone help me to explain the pseudocode in a simple and plain English?

  • Why NextChar does take a char input?

  • Why lexeme is the result 0f lexeme + char?

  • What is the result of Delta[state, cat];?