??xml version="1.0" encoding="utf-8" standalone="yes"?>一本大道亚洲视频,精品少妇v888av,亚洲一本大道在线http://www.aygfsteel.com/20070716/archive/2013/05/10/185527.html#399122?/dc:creator>?/author>Fri, 10 May 2013 13:31:00 GMThttp://www.aygfsteel.com/20070716/archive/2013/05/10/185527.html#399122谢谢了,?img src ="http://www.aygfsteel.com/20070716/aggbug/399122.html" width = "1" height = "1" />

]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2013/04/03/185527.html#397339啊啊啊啊?/dc:creator>啊啊啊啊?/author>Wed, 03 Apr 2013 03:18:00 GMThttp://www.aygfsteel.com/20070716/archive/2013/04/03/185527.html#397339

]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2012/11/14/185527.html#391334yyqyyqWed, 14 Nov 2012 12:44:00 GMThttp://www.aygfsteel.com/20070716/archive/2012/11/14/185527.html#391334写的工具生成的,基本原因是正规式和有限状态机Q细节就非一两句能说清了

yyq 2012-11-14 20:44 发表评论
]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2012/09/03/185527.html#386876zhozichozhozichoMon, 03 Sep 2012 07:18:00 GMThttp://www.aygfsteel.com/20070716/archive/2012/09/03/185527.html#386876ExpressionScanner.sd
ExpressionData.pd q俩个文件是怎么生成的,我急需原理

zhozicho 2012-09-03 15:18 发表评论
]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2011/07/02/185527.html#353545大v大落大v大落Sat, 02 Jul 2011 03:46:00 GMThttp://www.aygfsteel.com/20070716/archive/2011/07/02/185527.html#353545

大v大落 2011-07-02 11:46 发表评论
]]>
re: 做了个Java表达式计器[未登录]http://www.aygfsteel.com/20070716/archive/2011/06/23/185527.html#352908luhangluhangThu, 23 Jun 2011 13:38:00 GMThttp://www.aygfsteel.com/20070716/archive/2011/06/23/185527.html#3529081021044@qq,com

luhang 2011-06-23 21:38 发表评论
]]>
re: 做了个Java表达式计器[未登录]http://www.aygfsteel.com/20070716/archive/2011/06/23/185527.html#352907luhangluhangThu, 23 Jun 2011 13:35:00 GMThttp://www.aygfsteel.com/20070716/archive/2011/06/23/185527.html#3529071021044@qq.com

luhang 2011-06-23 21:35 发表评论
]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2011/02/12/185527.html#344151胡_?/dc:creator>胡_?/author>Sat, 12 Feb 2011 09:15:00 GMThttp://www.aygfsteel.com/20070716/archive/2011/02/12/185527.html#344151现在急需
cashhu@126.com

]]>
re: 做了个Java表达式计器[未登录]http://www.aygfsteel.com/20070716/archive/2010/09/05/185527.html#331062yyqyyqSat, 04 Sep 2010 16:12:00 GMThttp://www.aygfsteel.com/20070716/archive/2010/09/05/185527.html#331062ExpressionScanner.sd
ExpressionData.pd 是我自己写的分析器生成器自动生成的,光有源代码没意义的,因ؓ那个源代码根本不能手动修改,如果你想修改语法我倒是可以重新生成一个给你。。。?img src ="http://www.aygfsteel.com/20070716/aggbug/331062.html" width = "1" height = "1" />

yyq 2010-09-05 00:12 发表评论
]]>
re: 先知的苦[未登录]http://www.aygfsteel.com/20070716/archive/2010/09/04/254479.html#331060kellykellySat, 04 Sep 2010 15:43:00 GMThttp://www.aygfsteel.com/20070716/archive/2010/09/04/254479.html#331060

kelly 2010-09-04 23:43 发表评论
]]>
re: 叶子d[未登录]http://www.aygfsteel.com/20070716/archive/2010/09/04/257896.html#331059kellykellySat, 04 Sep 2010 15:39:00 GMThttp://www.aygfsteel.com/20070716/archive/2010/09/04/257896.html#331059

kelly 2010-09-04 23:39 发表评论
]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2010/08/19/185527.html#329327刘d刘dThu, 19 Aug 2010 02:51:00 GMThttp://www.aygfsteel.com/20070716/archive/2010/08/19/185527.html#329327ExpressionScanner.sd
ExpressionData.pd
你有ExpressionScanner.class的源代码吗?
可以发给我吗909030452@qq.com
谢谢Q?img src ="http://www.aygfsteel.com/20070716/aggbug/329327.html" width = "1" height = "1" />

刘d 2010-08-19 10:51 发表评论
]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2010/07/11/185527.html#325814yyqyyqSun, 11 Jul 2010 14:47:00 GMThttp://www.aygfsteel.com/20070716/archive/2010/07/11/185527.html#325814

yyq 2010-07-11 22:47 发表评论
]]>
发现一个严重问?/title><link>http://www.aygfsteel.com/20070716/archive/2010/07/05/185527.html#325308</link><dc:creator>changeYi</dc:creator><author>changeYi</author><pubDate>Mon, 05 Jul 2010 11:31:00 GMT</pubDate><guid>http://www.aygfsteel.com/20070716/archive/2010/07/05/185527.html#325308</guid><description><![CDATA[ 很明显,q个E序虽然看v来不错,但是一个很关键的问题:在表辑ּ输入框中无法输入{号Q这使表辑ּ~辑框与按钮框不能独立出来!{于说表辑ּ输入框属于额外付出!Q?img src ="http://www.aygfsteel.com/20070716/aggbug/325308.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/20070716/" target="_blank">changeYi</a> 2010-07-05 19:31 <a href="http://www.aygfsteel.com/20070716/archive/2010/07/05/185527.html#325308#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2009/12/27/185527.html#307452yyqyyqSun, 27 Dec 2009 13:18:00 GMThttp://www.aygfsteel.com/20070716/archive/2009/12/27/185527.html#307452ExpressionData.pd 是我自己写的语法分析器用到的文g。。。。?img src ="http://www.aygfsteel.com/20070716/aggbug/307452.html" width = "1" height = "1" />

yyq 2009-12-27 21:18 发表评论
]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2009/11/12/185527.html#302049benqbenqThu, 12 Nov 2009 01:53:00 GMThttp://www.aygfsteel.com/20070716/archive/2009/11/12/185527.html#302049

benq 2009-11-12 09:53 发表评论
]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2009/05/28/185527.html#278297黑妹黑妹Wed, 27 May 2009 16:50:00 GMThttp://www.aygfsteel.com/20070716/archive/2009/05/28/185527.html#278297501769230@QQ.com

黑妹 2009-05-28 00:50 发表评论
]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2009/05/21/185527.html#271990xiaohutu611xiaohutu611Thu, 21 May 2009 07:31:00 GMThttp://www.aygfsteel.com/20070716/archive/2009/05/21/185527.html#271990731001587@qq.com

xiaohutu611 2009-05-21 15:31 发表评论
]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2008/12/07/185527.html#244837sqkobe108sqkobe108Sun, 07 Dec 2008 02:31:00 GMThttp://www.aygfsteel.com/20070716/archive/2008/12/07/185527.html#244837

sqkobe108 2008-12-07 10:31 发表评论
]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2008/07/29/185527.html#218223yyqyyqMon, 28 Jul 2008 16:06:00 GMThttp://www.aygfsteel.com/20070716/archive/2008/07/29/185527.html#218223

yyq 2008-07-29 00:06 发表评论
]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2008/07/28/185527.html#217913yyqyyqSun, 27 Jul 2008 16:42:00 GMThttp://www.aygfsteel.com/20070716/archive/2008/07/28/185527.html#217913

yyq 2008-07-28 00:42 发表评论
]]>
re: l于拥有属于自己的Java扫描器生成器?/title><link>http://www.aygfsteel.com/20070716/archive/2008/07/28/142013.html#217912</link><dc:creator>yyq</dc:creator><author>yyq</author><pubDate>Sun, 27 Jul 2008 16:33:00 GMT</pubDate><guid>http://www.aygfsteel.com/20070716/archive/2008/07/28/142013.html#217912</guid><description><![CDATA[@chen_chirs<br>应该是JDK的版本太低吧Q用1.6可能会好了?img src ="http://www.aygfsteel.com/20070716/aggbug/217912.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/20070716/" target="_blank">yyq</a> 2008-07-28 00:33 <a href="http://www.aygfsteel.com/20070716/archive/2008/07/28/142013.html#217912#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: l于拥有属于自己的Java扫描器生成器?/title><link>http://www.aygfsteel.com/20070716/archive/2008/06/08/142013.html#206674</link><dc:creator>chen_chirs</dc:creator><author>chen_chirs</author><pubDate>Sun, 08 Jun 2008 06:06:00 GMT</pubDate><guid>http://www.aygfsteel.com/20070716/archive/2008/06/08/142013.html#206674</guid><description><![CDATA[?ant 去运行时会出?UnsupportedClassVersionErro<img src ="http://www.aygfsteel.com/20070716/aggbug/206674.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/20070716/" target="_blank">chen_chirs</a> 2008-06-08 14:06 <a href="http://www.aygfsteel.com/20070716/archive/2008/06/08/142013.html#206674#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: l于拥有属于自己的Java扫描器生成器?/title><link>http://www.aygfsteel.com/20070716/archive/2008/06/08/142013.html#206672</link><dc:creator>chen_chirs</dc:creator><author>chen_chirs</author><pubDate>Sun, 08 Jun 2008 06:05:00 GMT</pubDate><guid>http://www.aygfsteel.com/20070716/archive/2008/06/08/142013.html#206672</guid><description><![CDATA[?ant 去运行时会出?NoSuchFieldException<img src ="http://www.aygfsteel.com/20070716/aggbug/206672.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/20070716/" target="_blank">chen_chirs</a> 2008-06-08 14:05 <a href="http://www.aygfsteel.com/20070716/archive/2008/06/08/142013.html#206672#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2008/05/26/185527.html#202865gjzgjzMon, 26 May 2008 03:52:00 GMThttp://www.aygfsteel.com/20070716/archive/2008/05/26/185527.html#202865

gjz 2008-05-26 11:52 发表评论
]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2008/05/13/185527.html#200137游客游客Tue, 13 May 2008 02:17:00 GMThttp://www.aygfsteel.com/20070716/archive/2008/05/13/185527.html#200137zhouchen12345678910@yahoo.cn

游客 2008-05-13 10:17 发表评论
]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2008/03/14/185527.html#186368木风口子木风口子Fri, 14 Mar 2008 11:43:00 GMThttp://www.aygfsteel.com/20070716/archive/2008/03/14/185527.html#186368

木风口子 2008-03-14 19:43 发表评论
]]>
re: 做了个Java表达式计器[未登录]http://www.aygfsteel.com/20070716/archive/2008/03/14/185527.html#186169李敏李敏Thu, 13 Mar 2008 17:26:00 GMThttp://www.aygfsteel.com/20070716/archive/2008/03/14/185527.html#186169
email: onewalkingman@163.com

李敏 2008-03-14 01:26 发表评论
]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2008/03/12/185527.html#185650lvq810lvq810Wed, 12 Mar 2008 04:28:00 GMThttp://www.aygfsteel.com/20070716/archive/2008/03/12/185527.html#185650import java.util.*;
/**
*利用正则式计表辑ּ的?br>*@author: Eastsun
*@version: 0.5 07.2.26
*/
public class Calculate{
public static final String NUM_PATTERN = //数字的匹配模?br> "(?:(?<=[\\+\\-\\*\\(/]|^)[+-]|)" //前缀判断,判断前面?-是否为符?br> +"(?:" //数字及小数点部分, 0. 以及 .0 都是合法的数?br> +"(?:\\d*\\.)?\\d+|" //.0 的情?br> +"\\d+(?:\\.\\d*)?" //0. 的情?br> +")"
+"(?!\\d|\\.)"; //边界条g
public static final String BRA_PATTERN =
"\\((NUM)\\)".replace("NUM",NUM_PATTERN);
public static final String ADD_PATTERN =
"(NUM)\\+(NUM)".replace("NUM",NUM_PATTERN);
public static final String SUB_PATTERN =
"(NUM)-(NUM)".replace("NUM",NUM_PATTERN);
public static final String MUL_PATTERN =
"(NUM)\\*(NUM)".replace("NUM",NUM_PATTERN);
public static final String DIV_PATTERN =
"(NUM)/(NUM)".replace("NUM",NUM_PATTERN);
public static final Pattern BRA =Pattern.compile(BRA_PATTERN);
public static final Pattern ADD_OR_SUB =Pattern.compile("(?<=[^\\+\\-\\*/]|^)(?:"+ADD_PATTERN+"|"+SUB_PATTERN+")(?=[^\\*/]|$)");
public static final Pattern MUL_OR_DIV =Pattern.compile("(?<![\\*/])(?:"+MUL_PATTERN+"|"+DIV_PATTERN+")");

private static double operator(Matcher m,int index){
index =index*2;
double a,b;
if(m.group(1)!=null){
a =Double.parseDouble(m.group(1));
b =Double.parseDouble(m.group(2));
}
else{
index ++;
a =Double.parseDouble(m.group(3));
b =Double.parseDouble(m.group(4));
}
double r =0.0;
switch(index){
case 0:
r =a+b;
break;
case 1:
r =a-b;
break;
case 2:
r =a*b;
break;
case 3:
r =a/b;
break;
}
return r;
}
public static double eval(String str){
StringBuilder sb =new StringBuilder(str.replaceAll("\\s+",""));
while(true){
Matcher m =BRA.matcher(sb);
if(m.find()){
sb.replace(m.start(),m.end(),m.group(1));
}
else{
int index =1;
m =MUL_OR_DIV.matcher(sb);
if(!m.find()){
index --;
m =ADD_OR_SUB.matcher(sb);
if(!m.find()) break;
}
sb.replace(m.start(),m.end(),""+operator(m,index));
}
}
return Double.parseDouble(sb.toString());
}
public static void main(String[] args){
Scanner scan =new Scanner(System.in);
while(true){
System.out.print("\nEnter a expression :");
String str =scan.next();
if(str.equals("exit")) break;
System.out.print(str +" = "+eval(str));
}
}
}

lvq810 2008-03-12 12:28 发表评论
]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2008/03/12/185527.html#185648yyqyyqWed, 12 Mar 2008 04:28:00 GMThttp://www.aygfsteel.com/20070716/archive/2008/03/12/185527.html#185648更新了一下,应该可以兼容1.5了?img src ="http://www.aygfsteel.com/20070716/aggbug/185648.html" width = "1" height = "1" />

yyq 2008-03-12 12:28 发表评论
]]>
re: 做了个Java表达式计器[未登录]http://www.aygfsteel.com/20070716/archive/2008/03/12/185527.html#185562hhWed, 12 Mar 2008 01:38:00 GMThttp://www.aygfsteel.com/20070716/archive/2008/03/12/185527.html#185562

h 2008-03-12 09:38 发表评论
]]>
re: 做了个Java表达式计器[未登录]http://www.aygfsteel.com/20070716/archive/2008/03/12/185527.html#185545xxxxxxWed, 12 Mar 2008 01:00:00 GMThttp://www.aygfsteel.com/20070716/archive/2008/03/12/185527.html#185545

xxx 2008-03-12 09:00 发表评论
]]>
re: 做了个Java表达式计器http://www.aygfsteel.com/20070716/archive/2008/03/12/185527.html#185532李敏李敏Tue, 11 Mar 2008 20:25:00 GMThttp://www.aygfsteel.com/20070716/archive/2008/03/12/185527.html#185532

李敏 2008-03-12 04:25 发表评论
]]>
re: FInt —?一个面向整数的Java集合工具包[未登录]http://www.aygfsteel.com/20070716/archive/2007/11/07/158694.html#158815heheheheWed, 07 Nov 2007 06:46:00 GMThttp://www.aygfsteel.com/20070716/archive/2007/11/07/158694.html#158815

hehe 2007-11-07 14:46 发表评论
]]>
re: l于拥有属于自己的Java扫描器生成器了[未登录]http://www.aygfsteel.com/20070716/archive/2007/09/02/142013.html#142025hiswinghiswingSun, 02 Sep 2007 01:07:00 GMThttp://www.aygfsteel.com/20070716/archive/2007/09/02/142013.html#142025

hiswing 2007-09-02 09:07 发表评论
]]>
վ֩ģ壺 | | ͨμ| פ| | ˫| | ̨| Ͷ| | ̫| | Ƕ| | | | Ԫ| | | ʡ| | Ϫ| | | | ĵ| Ͷ| | | | | | | Ӷ| ˳| | | | Ͷ| ຣʡ| |