This is an automated email from the ASF dual-hosted git repository. cbrisson pushed a commit to branch VELOCITY-961 in repository https://gitbox.apache.org/repos/asf/velocity-engine.git
commit aead6947622842e2142e0b04ebb322a5e54ed918 Author: Claude Brisson <[email protected]> AuthorDate: Fri Aug 23 20:34:19 2024 +0200 Fix a parsing regression --- velocity-engine-core/src/main/parser/Parser.jjt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/velocity-engine-core/src/main/parser/Parser.jjt b/velocity-engine-core/src/main/parser/Parser.jjt index 0ae0fdc1..09889d00 100644 --- a/velocity-engine-core/src/main/parser/Parser.jjt +++ b/velocity-engine-core/src/main/parser/Parser.jjt @@ -1082,6 +1082,11 @@ MORE : /* do not push PRE states */ if (curLexState != PRE_REFERENCE && curLexState != PRE_DIRECTIVE && curLexState != PRE_OLD_REFERENCE) { + /* The hash can never come back to REFMOD3 */ + if (curLexState == REFMOD3) + { + switchTo(DEFAULT); + } stateStackPush(); } switchTo(PRE_DIRECTIVE); @@ -1386,7 +1391,7 @@ TOKEN: * REFERENCE Lexical States * * This is more than a single state, because of the structure of - * the VTL references. We use three states because the set of tokens + * the VTL references. We use several states because the set of tokens * for each state can be different. * * $foo.bar( "arg" )
