All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.plain.plain.ftl Maven / Gradle / Ivy

There is a newer version: 0.4.3
Show newest version
<#setting number_format=0>
<#macro array a>
<#list a as i><#if i_index > 0>,${i}

<#macro intarray a>
<#list a as i><#if i_index > 0>,${i}

<#macro intarray3d b>
<#list b as a>
	<@intarray a/>


<#if lexer?has_content>
# lexer
# properties
: unicode = ${unicode?string}
: bol = ${lexer.bol?string}
: backup = ${lexer.backup?string}
: cases = ${lexer.caseCount}
: table = ${lexer.table}
<#if lexer.table == "ecs" || lexer.table == "compressed">
: ecs = ${lexer.ecsGroupCount}

: states = ${lexer.dfa.size}
# memory usage
: full table = ${((lexer.eof + 1) * lexer.dfa.size)}
<#if lexer.table == "ecs" || lexer.table == "compressed">
: ecs table = ${(lexer.eof + 1 + lexer.ecsGroupCount * lexer.dfa.size)}

<#if lexer.table == "compressed">
: next = ${lexer.dfa.next?size}
: check = ${lexer.dfa.check?size}
<#if !lexer.dfa.default?has_content>
: compressed table = ${(lexer.eof + 1 + lexer.dfa.next?size + lexer.dfa.next?size)}
<#else>
: default = ${lexer.dfa.default?size}
<#if !lexer.dfa.meta?has_content>
: compressed table = ${(lexer.eof + 1 + lexer.dfa.next?size + lexer.dfa.next?size + lexer.dfa.default?size)}
<#else>
: meta = ${lexer.dfa.meta?size}
: compressed table = ${lexer.eof + 1 + lexer.dfa.next?size + lexer.dfa.next?size + lexer.dfa.default?size + lexer.dfa.meta?size}



<#if lexer.table == "ecs" || lexer.table == "compressed">
# ecs
<@intarray lexer.dfa.ecs/>

# dfa
<#if lexer.table == "ecs" || lexer.table == "full">
<@intarray3d lexer.dfa.table/>

<#if lexer.table == "compressed">
# compressed correctly = ${lexer.dfa.correct?string}
# base
<@intarray lexer.dfa.base/>
# next
<@intarray lexer.dfa.next/>
# check
<@intarray lexer.dfa.check/>
<#if lexer.dfa.default?has_content>
# default
<@intarray lexer.dfa.default/>

<#if lexer.dfa.error>
: error = ${lexer.dfa.error?string}

<#if lexer.dfa.meta?has_content>
# meta
<@intarray lexer.dfa.meta/>


# states
<@array lexer.states/>
# begins
<@intarray lexer.begins/>
# accepts
<@intarray lexer.accept/>
# cases
<#list lexer.cases as i>
<#list i.patterns as p>
# case ${p.caseValue}
{${i.action}}


# end

<#if parser?has_content>
# parser
# properties
: symbols = ${parser.symbols?size}
: max terminal = ${parser.maxTerminal}
: used terminals = ${parser.usedTerminalCount}
: non-terminals = ${parser.nonTerminalCount}
: rules = ${parser.rules?size - 1}
: shift/reduce conflicts = ${parser.shiftConflict}
: reduct/reduce conflicts = ${parser.reduceConflict}
# memory usage
: ecs table = ${(parser.ecs?size + (parser.usedTerminalCount + parser.nonTerminalCount) * parser.dfa.size)}
<#if parser.table == "compressed">
: compressed table = ${parser.ecs?size + parser.dfa.totalSize}

# ecs
<@intarray parser.ecs/>
<#if parser.table == "ecs">
# table
<@intarray3d parser.dfa.table/>
<#else>
# compressed correctly = ${parser.dfa.correct?string}
# base add
${parser.dfa.baseAdd}
# base
<@intarray parser.dfa.base/>
# next
<@intarray parser.dfa.next/>
# check
<@intarray parser.dfa.check/>
<#if parser.dfa.default?has_content>
# default
<@intarray parser.dfa.default/>

<#if parser.dfa.error>
: error = ${parser.dfa.error?string}

<#if parser.dfa.meta?has_content>
# meta
<@intarray parser.dfa.meta/>

<#if parser.dfa.gotoDefault?has_content>
# goto default
<@intarray parser.dfa.gotoDefault/>


# rules
<@intarray parser.rules/>
# cases
<#list parser.cases as i>
<#list i.rhs as p>
# case ${p.caseValue}
{${p.action}}







© 2015 - 2024 Weber Informatics LLC | Privacy Policy