/* Generated By:JavaCC: Do not edit this line. FMParserTokenManager.java */
package freemarker.core;
import freemarker.template.*;
import freemarker.template.utility.StringUtil;
import freemarker.template.utility.DeepUnwrap;
import java.io.*;
import java.util.*;
class FMParserTokenManager implements FMParserConstants
{
/**
The noparseTag is set when we enter
a block of text that the parser more or less ignores.
These are <noparse> and <comment>. This variable
tells us what the closing tag should be, and when
we hit that, we resume parsing. Note that with this
scheme, <comment> and <noparse> tags cannot nest
recursively, but it is not clear how important that is.
*/
String noparseTag;
/**
Keeps track of how deeply nested
we have the hash literals.
This is necessary since we need to be
able to distinguish the } used to close
a hash literal and the one used to
close a ${
*/
private int hashLiteralNesting;
private int parenthesisNesting;
private int bracketNesting;
private boolean inFTLHeader;
boolean strictEscapeSyntax,
onlyTextOutput,
altDirectiveSyntax,
autodetectTagSyntax,
directiveSyntaxEstablished,
inInvocation;
String templateName;
// This method checks if we are in a strict mode where all
// FreeMarker directives must start with <#
private void strictSyntaxCheck(Token tok, int newLexState) {
if (onlyTextOutput) {
tok.kind = PRINTABLE_CHARS;
return;
}
char firstChar = tok.image.charAt(0);
if (autodetectTagSyntax && !directiveSyntaxEstablished) {
altDirectiveSyntax = (firstChar == '[');
}
if ((firstChar == '[' && !altDirectiveSyntax) || (firstChar == '<' && altDirectiveSyntax)) {
tok.kind = PRINTABLE_CHARS;
return;
}
if (!strictEscapeSyntax) {
SwitchTo(newLexState);
return;
}
if (!altDirectiveSyntax) {
if (!tok.image.startsWith("<#") && !tok.image.startsWith("</#")) {
tok.kind = PRINTABLE_CHARS;
return;
}
}
directiveSyntaxEstablished = true;
SwitchTo(newLexState);
}
private void unifiedCall(Token tok) {
char firstChar = tok.image.charAt(0);
if (autodetectTagSyntax && !directiveSyntaxEstablished) {
altDirectiveSyntax = (firstChar == '[');
}
if (altDirectiveSyntax && firstChar == '<') {
tok.kind = PRINTABLE_CHARS;
return;
}
if (!altDirectiveSyntax && firstChar == '[') {
tok.kind = PRINTABLE_CHARS;
return;
}
directiveSyntaxEstablished = true;
SwitchTo(NO_SPACE_EXPRESSION);
}
private void unifiedCallEnd(Token tok) {
char firstChar = tok.image.charAt(0);
if (altDirectiveSyntax && firstChar == '<') {
tok.kind = PRINTABLE_CHARS;
return;
}
if (!altDirectiveSyntax && firstChar == '[') {
tok.kind = PRINTABLE_CHARS;
return;
}
}
private void closeBracket(Token tok) {
if (bracketNesting >0) {
--bracketNesting;
} else {
tok.kind=DIRECTIVE_END;
if (inFTLHeader) {
eatNewline();
inFTLHeader = false;
}
SwitchTo(DEFAULT);
}
}
private void eatNewline() {
int charsRead = 0;
try {
while (true) {
char c = input_stream.readChar();
++charsRead;
if (!Character.isWhitespace(c)) {
input_stream.backup(charsRead);
return;
} else if (c=='\r') {
char next = input_stream.readChar();
++charsRead;
if (next != '\n') {
input_stream.backup(1);
}
return;
} else if (c=='\n') {
return;
}
}
} catch (IOException ioe) {
input_stream.backup(charsRead);
}
}
private void ftlHeader(Token matchedToken) {
if (!directiveSyntaxEstablished) {
altDirectiveSyntax = matchedToken.image.charAt(0) == '[';
directiveSyntaxEstablished = true;
autodetectTagSyntax = false;
}
String img = matchedToken.image;
char firstChar = img.charAt(0);
char lastChar = img.charAt(img.length() -1);
if ((firstChar == '[' && !altDirectiveSyntax) || (firstChar == '<' && altDirectiveSyntax)) {
matchedToken.kind = PRINTABLE_CHARS;
}
if (matchedToken.kind != PRINTABLE_CHARS) {
if (lastChar != '>' && lastChar != ']') {
SwitchTo(FM_EXPRESSION);
inFTLHeader = true;
} else {
eatNewline();
}
}
}
public java.io.PrintStream debugStream = System.out;
public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
private final int jjMoveStringLiteralDfa0_7()
{
return jjMoveNfa_7(0, 0);
}
private final void jjCheckNAdd(int state)
{
if (jjrounds[state] != jjround)
{
jjstateSet[jjnewStateCnt++] = state;
jjrounds[state] = jjround;
}
}
private final void jjAddStates(int start, int end)
{
do {
jjstateSet[jjnewStateCnt++] = jjnextStates[start];
} while (start++ != end);
}
private final void jjCheckNAddTwoStates(int state1, int state2)
{
jjCheckNAdd(state1);
jjCheckNAdd(state2);
}
private final void jjCheckNAddStates(int start, int end)
{
do {
jjCheckNAdd(jjnextStates[start]);
} while (start++ != end);
}
private final void jjCheckNAddStates(int start)
{
jjCheckNAdd(jjnextStates[start]);
jjCheckNAdd(jjnextStates[start + 1]);
}
static final long[] jjbitVec0 = {
0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
};
static final long[] jjbitVec2 = {
0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
};
private final int jjMoveNfa_7(int startState, int curPos)
{
int[] nextStates;
int startsAt = 0;
jjnewStateCnt = 13;
int i = 1;
jjstateSet[0] = startState;
int j, kind = 0x7fffffff;
for (;;)
{
if (++jjround == 0x7fffffff)
ReInitRounds();
if (curChar < 64)
{
long l = 1L << curChar;
MatchLoop: do
{
switch(jjstateSet[--i])
{
case 0:
if ((0xefffdfffffffffffL & l) != 0L)
{
if (kind > 131)
kind = 131;
jjCheckNAdd(6);
}
else if ((0x1000200000000000L & l) != 0L)
{
if (kind > 132)
kind = 132;
}
if (curChar == 45)
jjAddStates(0, 1);
else if (curChar == 60)
jjstateSet[jjnewStateCnt++] = 1;
break;
case 1:
if (curChar == 47)
jjCheckNAddTwoStates(2, 3);
break;
case 2:
if (curChar == 35)
jjCheckNAdd(3);
break;
case 4:
if ((0x100002600L & l) != 0L)
jjAddStates(2, 3);
break;
case 5:
if (curChar == 62 && kind > 130)
kind = 130;
break;
case 6:
if ((0xefffdfffffffffffL & l) == 0L)
break;
if (kind > 131)
kind = 131;
jjCheckNAdd(6);
break;
case 7:
if ((0x1000200000000000L & l) != 0L && kind > 132)
kind = 132;
break;
没有合适的资源?快使用搜索试试~ 我知道了~
java web 框架 源代码
共1820个文件
html:851个
java:608个
xml:90个
5星 · 超过95%的资源 需积分: 48 287 下载量 152 浏览量
2009-10-22
13:34:46
上传
评论 7
收藏 16.22MB RAR 举报
温馨提示
Java 常用 web 框架源代码,可以直接link myeclipse ,主要包含struts hibernate_src dom4j spring log4 common-fileupload webwork
资源推荐
资源详情
资源评论
收起资源包目录
java web 框架 源代码 (1820个子文件)
xmlLayout.1 5KB
dom.A1.1 4KB
patternLayout.1 4KB
dom.A2.1 3KB
socketServer.1 2KB
customLogger.1 941B
xmlLayout.mdc.1 296B
customLevel.1 210B
hierarchyThreshold.1 0B
patternLayout.10 6KB
patternLayout.11 5KB
patternLayout.12 6KB
patternLayout.13 6KB
patternLayout.14 4KB
xmlLayout.2 7KB
patternLayout.2 5KB
socketServer.2 2KB
xmlLayout.mdc.2 356B
customLevel.2 210B
hierarchyThreshold.2 51B
customLogger.2 47B
patternLayout.3 5KB
socketServer.3 2KB
xmlLayout.3 720B
hierarchyThreshold.3 102B
customLevel.3 42B
patternLayout.4 5KB
dom.A1.4 4KB
dom.A2.4 3KB
socketServer.4 2KB
customLevel.4 210B
hierarchyThreshold.4 152B
patternLayout.5 5KB
socketServer.5 2KB
hierarchyThreshold.5 202B
patternLayout.6 5KB
socketServer.6 2KB
hierarchyThreshold.6 253B
patternLayout.7 5KB
socketServer.7 2KB
hierarchyThreshold.7 304B
patternLayout.8 5KB
socketServer.8 2KB
hierarchyThreshold.8 304B
patternLayout.9 5KB
publications.apt 4KB
index.apt 3KB
download.apt 3KB
roadmap.apt 1KB
mycat.bad 1KB
run-tests.bat 7KB
exception.bin 2KB
mdc.bin 508B
location.bin 465B
ndc.bin 409B
simple.bin 399B
MSG00001.bin 164B
info.bin 60B
CONTENTS 3KB
nteventlog.cpp 8KB
maven-theme.css 3KB
maven-base.css 2KB
stylesheet.css 1KB
stylesheet.css 1KB
stylesheet.css 1KB
site.css 775B
site.css 775B
print.css 222B
NTEventLogAppender.dll 10KB
web-app_2_3.dtd 32KB
web-app_2_2.dtd 18KB
web-jsptaglibrary_1_2.dtd 11KB
log4j.dtd 7KB
log4j.dtd 7KB
web-jsptaglibrary_1_1.dtd 5KB
PerformanceTest.fm 76B
faq.fml 29KB
test-recover.ftl 721B
test-recover.ftl 608B
test-default.ftl 219B
nestedinclude.ftl 82B
test-default.ftl 42B
undefined.ftl 21B
od.gif 6KB
od.gif 6KB
lf5_small_icon.gif 1KB
icon_help_sml.gif 1019B
icon_error_sml.gif 1010B
icon_success_sml.gif 990B
channelexplorer_new.gif 778B
icon_info_sml.gif 606B
icon_warning_sml.gif 576B
channelexplorer_satellite.gif 256B
remove.gif 227B
add.gif 207B
update.gif 192B
fix.gif 181B
inherit.gif 57B
collapsed.gif 53B
expanded.gif 52B
共 1820 条
- 1
- 2
- 3
- 4
- 5
- 6
- 19
wanggang411912
- 粉丝: 4
- 资源: 15
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页