bl791's picture
download
raw
1.66 kB
package mechanique;
/*
MechaniQue, the programming language for Interactive Fiction
Copyright (C) 2007 G.J.G.T. (Gabor) de Mooij
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation (highest version applies !!).
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
---MECHANIQUESOFT/GABOR DE MOOIJ
*/
import java.io.*;
import java.util.*;
import java.util.regex.*;
import java.applet.*;
import java.io.Serializable;
import java.lang.Math;
;
public class ParserFactory
{
private Parser product;
public Parser make(String t)
{
String[] lines = t.split("@");
Parser p = new Parser();
for(int j=0; j<lines.length; j++)
{
String rule = lines[j].replaceAll("\\n","").replaceAll("\\s","");
String replacer = "";
if (rule.indexOf("=")!=-1){
replacer = rule.split("=")[1];
rule = rule.split("=")[0];
}
p.addParseRule(rule,replacer);
}
return p;
}
}

Xet Storage Details

Size:
1.66 kB
·
Xet hash:
86ab81056c36300aee42034ada6c136cca872e278a0fd6644c4d7333246a2287

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.