packages/jison-lex/examples/reference-output/semwhitespace_lex.jison-lexer.js
/**
     * return a string which displays the character position where the
     * lexing error occurred, i.e. for error messages
     *
     * @public
     * @this {RegExpLexer}
     */
return a string which displays the character position where the
lexing error occurred, i.e. for error messages


return a string which displays the character position where the lexing error occurred i . e . for error messages
function lexer_showPosition(maxPrefix, maxPostfix) {
        var pre = this.pastInput(maxPrefix).replace(/\s/g, ' ');
        var c = new Array(pre.length + 1).join('-');
        return pre + this.upcomingInput(maxPostfix).replace(/\s/g, ' ') + '\n' + c + '^';
    }
function lexer_showPosition ( maxPrefix , maxPostfix ) { var pre = this . pastInput ( maxPrefix ) . replace ( / \s / g , ' ' ) ; var c = new Array ( pre . length + 1 ) . join ( '-' ) ; return pre + this . upcomingInput ( maxPostfix ) . replace ( / \s / g , ' ' ) + '\n' + c + '^' ; }
return a string which displays the character position where the
 lexing error occurred, i.e.
return a string which displays the character position where the lexing error occurred i . e .