<commit_before>import scalac.util.Name ;
import scala.tools.scalac.ast.parser.Tokens ; /* for keywords */

package scala.tools.dtd2scala {

import java.io.PrintWriter ;
import org.xml.sax.InputSource ;

import scala.collection.Map ;
import scala.collection.mutable.HashMap ;

import scala.xml._ ;
import scala.xml.dtd._;
import scala.xml.nobinding.XML ;

/** transforms a set of DTD declaraion to a scala source file.
 *  2do: parameterize with destination package.
 */
class DeclToScala(fOut:PrintWriter,
		  moduleName:String,
		  elemMap:Map[ String, MyElemDecl ] ) {

  abstract class objectTemplate {
    val objectName : String = "myXML"; /* DEFAULT MODULE NAME */
    val package_ : String = "";
    val compress : boolean = true;
    final val tmplFile = "scala/tools/dtd2scala/template/ObjectTemplate.scala.xml";
    final val tmpl:Node = XML.load( new InputSource(ClassLoader.getSystemResourceAsStream(tmplFile)) );

    val lookup : HashMap[String,String] = new HashMap[String,String]();<commit_msg>less dependency<commit_after>import scalac.util.Name ;
import scala.tools.scalac.ast.parser.Tokens ; /* for keywords */

package scala.tools.dtd2scala {

import java.io.PrintWriter ;
import org.xml.sax.InputSource ;

import scala.collection.Map ;
import scala.collection.mutable.HashMap ;

import scala.xml._ ;
import scala.xml.dtd.AttrDecl;
import scala.xml.nobinding.XML ;

/** transforms a set of DTD declaraion to a scala source file.
 *  2do: parameterize with destination package.
 */
class DeclToScala(fOut:PrintWriter,
		  moduleName:String,
		  elemMap:Map[ String, MyElemDecl ] ) {

  abstract class objectTemplate {
    val objectName : String = "myXML"; /* DEFAULT MODULE NAME */
    val package_ : String = "";
    val compress : boolean = true;
    final val tmplFile = "scala/tools/dtd2scala/template/ObjectTemplate.scala.xml";
    final val tmpl:Node = XML.load( new InputSource(ClassLoader.getSystemResourceAsStream(tmplFile)) );

    val lookup : HashMap[String,String] = new HashMap[String,String]();
{'fraction_non_alphanumeric': 0.11237062592410055, 'fraction_numerical': 0.002957121734844751, 'mean_word_length': 4.205128205128205, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5758150', 'n_tokens_mistral': 652, 'n_tokens_neox': 629, 'n_words': 152}