Have you ever wanted to develop a math parser and evaluator? Are you in such a quandary or just have curiosity or interest in the matter? If so, you may download the complete source version 8.3.48 or later, but be warned there is almost no comment; or instead, follow versions v8.4.x which will be more digest and, of course, all the source code for each new v8.4.x will be there, if you wish, to download. Currently, v8.4.0 does simple arithmetic but contains the main classes and algorithms that hold all the rest. Version 8.4.0 has been developed entirely under MS …

Member Avatar
Member Avatar
+0 forum 22

Hi,all I need a java parser for parsing any java file in any package,not only existing file ...Can i do this ? how?

Member Avatar
Member Avatar
+0 forum 10

Hi, in this code how can I calculate coupling between objects CBO in java after parsing java file using registerCoupling method and retrieve any coupling between classes through argument, class name,type and so on .....

Member Avatar
Member Avatar
+0 forum 4

Dajia hao, daniwebians! Just a quick question, is it possible to focus on a textbox on an externally loaded website? My goal is to load an external website, focus on a textfield, auto fill it with the current date, then submit it to then run my newly created scraper tool on the resulting page. Any ideas? I've done a bit of research and will continue to do so...

Member Avatar
Member Avatar
+0 forum 9

I've have a String String s = " ~ ( A || B ) && C "; A B C can take 0,1,x they follow Boolean Arithmetic w.r.t 'x' Boolean Arith is as follows 0 || x = x 1 || x = 1 x || x =1 x && 0 = 0 x && x = x x && 1 = x ~ x = x Now I've A = 1 B = x C = x ; and I want to evaluate String "s: to get Output boolean value (i.e 1,0,x ) . Currently I'm thinking of Shunting …

Member Avatar
Member Avatar
+0 forum 3

Hi all, I've started to get acquinted with Perl's HTML::Parser, which does a really good job at parsing html (duh ;-) But for the life of me, I can't get it to return the actual text from subroutine! I keep getting references to it :\ :\ use HTML::Parser; package MyParser; sub start { my ($self, $tagname, $attr, $attrseq, $origtext) = @_; if ($tagname eq 'img') { my $Title=$attr->{ title }; # now this works well, and actually prints the value and not the reference! print "Image title found: ", $attr->{ title }, "\n"; return($Title); } else {return();} } my $parser …

Member Avatar
Member Avatar
+0 forum 2

Hi, I am implement a plugin project in eclipse in java language. I have a parse which is in s simple txt file. Below is the txt for the parser. id=app1 [String] #type=app [String] mainView=top name=First App [String] children: size=1 === child[0] === class=View id=top [String] #type=View [String] #line=8 [Integer] #info= name=View [String] parent=app1 #pos=0 [String] children: size=4 === child[0.0] === class=Widget id=l1 [String] #type=Label [String] text=Hello [String] #line=9 [Integer] #info= name=Label [String] parent=top #pos=0.0 [String] === child[0.1] === class=Widget id=b1 [String] #type=Button [String] text=Press [String] #line=10 [Integer] #info= name=Button [String] parent=top #pos=0.1 [String] im trying to implement the code …

Member Avatar
+0 forum 0

A PHP Error was encountered Severity: 4096 Message: Object of class CI_DB_mysql_result could not be converted to string Filename: libraries/Parser.php Line Number: 101 the code id <?php foreach($query->result() as $rows): ?> <?php echo $rows->title; ?> <?php endforeach; ?> Any solution.

Member Avatar
Member Avatar
+0 forum 4

Hello everyone, I'm an amateur programmer, and I am working on a program to help me practice my mental math. The essence of this program is that the user inputs an expression which will be the form of each question. Their goal is to solve those expressions as fast as they can. For example, let's say I input a quadratic formula of (ax^2 + bx + c). My program will then read each variable in the equation, and allow the user to specify minimum and maximum values for each variable, as well as the increments. From this, it will randomly …

Member Avatar
Member Avatar
+0 forum 2

How to parse a string data " B. Prakash 98400 51038 B.M. LAL BROS., TYRjijbEALERS 3 Whites Road, Royapettoh,thennai r 600 014. Ph: 2852 4560 Fax: +91-44-2858 8306 Email: bmlalbros@etn.iiet'" conisder this is my string data and i need to fetch name, address, phone , email seperately is there any logic there... how to parse ... by theory wise i know use string tokenizer or string[] string.split(" .... ") but this req one character based on that it split... wat i am suggest is @ means sure ly it is email .. i need to fetch whole word (XXX@YYYY) +91 …

Member Avatar
Member Avatar
+0 forum 3

Hello, I want a resume parser in PHP, which parse the resume and take candidates name, skill set, city, education, etc. If anyone have it and want to share then please do. (because due to some time schedule, I donthave time to write.) or please do let me know links from where I can get some guidedance to write the parser. Help...

Member Avatar
Member Avatar
+0 forum 5

Hi i am trying to parse a *large xml* file and printing the tags to a output file. I am using *minidom*, my code is working fine for 30Mb files but more than that its getting memory error.So i used buffer reading the file but unable to get the desired output. XML File <File> <TV>Sony</TV> <FOOD>Burger</FOOD> <PHONE>Apple</PHONE> </File> <File> <TV>Samsung</TV> <FOOD>Pizza</FOOD> <PHONE>HTC</PHONE> </File> Desired Output Sony,Burger,Apple Samsung,Pizza,HTC When reading in buffer its giving me an output say :- *Sony,Bur Samsung,Pizza,HT* code: while 1: content = File.read(2048) if not len(content): break for lines in StringIO(content): lines = lines.lstrip(' ') if lines.startswith("<TV>"): …

Member Avatar
Member Avatar
+0 forum 4

Hello Internet. So the task is to create our own parser for a expression calculator. For Example: Input: 3+2*1-6/3 Output: 3 Input: 3++2 Output: Invalid Expression Input: -5+2 Output: -3 Input: 5--2 Output: 7 The code [Here](http://www.technical-recipes.com/2011/a-mathematical-expression-parser-in-java/) solves a part of the problem except that it has a fixed input and negative values cannot be solved, And I'm not quite sure yet if it really does solve the expression with operator precedence. but I already modified it to get an input expression from the user. and I've been wondering for hours how to implement the solving for negative values. help …

Member Avatar
Member Avatar
+0 forum 1

Parser implementation Hi I am trying to implement a parser for a simple language with grammar like this. program ::= "program" declarations "begin" statements "end" declaration ::= "var" ident "as" type type ::= "string" | "int" I have the first two done, how would I write the type grammar? program( prog( DECLS, STATS ) ) --> [ 'program' ], declarations( DECLS ), [ 'begin' ], statements( STATS ), [ 'end' ]. declaration( decl( IDENT, TYPE ) ) --> [ 'var' ], ident( IDENT ), [ 'as' ], type( TYPE ).

Member Avatar
Member Avatar
+0 forum 2

I am using PHP Simple HTML DOM Parser * [Manual] to fetch data from websites. Now what i wanna do is to remove first three words from all span which has `class="yeah"` from the fetched content So i have implement this code but it has a problem: foreach($html->find('span.yeah') as $xdat) { $x_des = implode(' ', array_slice(explode(' ', strip_tags($xdat)), 0, 3)); $result = str_replace($x_des, ' ', $result); $result = str_get_html($result); } Though it delete first three words from all `<span class="yeah">` but the problem is, this modify full fetched content. But i wanna modify only those data whose are in `<span …

Member Avatar
Member Avatar
+0 forum 2

Hi I am trying to implement a parser for a simple language with grammar like this. program ::= "program" declarations "begin" statements "end" declaration ::= "var" ident "as" type type ::= "string" | "int" I have the first two done, how would I write the type grammar? program( prog( DECLS, STATS ) ) --> [ 'program' ], declarations( DECLS ), [ 'begin' ], statements( STATS ), [ 'end' ]. declaration( decl( IDENT, TYPE ) ) --> [ 'var' ], ident( IDENT ), [ 'as' ], type( TYPE ).

Member Avatar
+0 forum 0

how to get content from a table id in [simple html dom parser](http://simplehtmldom.sourceforge.net), the table id is `products` and i have tried with this code: <?php include("dom.php"); $html = file_get_html("http://www.example.com"); $result = $html->find('table[id=products]'); echo "$result"; ?> but don't works, any idea to fetch content of a table which id is `products`? Thanks

Member Avatar
Member Avatar
+0 forum 1

I am just starting with Simple PHP HTML DOM PARSER so, what is the way to replace text only of any fetched content. Suppose i have fetched some content from a website with full HTML codes, but while applying PHP code like `$html = str_replace(".", "DOT", $html);` it cause a error. Because in this case it replace all `.` with `DOT` so that all links are broken, but what i want is just to replace `.` to `DOT` in texts but all code should be untouched. Assuming, The fetched data is something like this `<a href="http://example.com">Example.com</a>` The Output should be …

Member Avatar
Member Avatar
+0 forum 6

i wonder if it is possible to fetch images using [PHP Simple HTML DOM Parser](http://simplehtmldom.sourceforge.net/) and obtain it in a specific URL. Suppose it fetched a Image in a variable like $img = 'http://www.example.com/some_image_address.JPEG'; Now is it possible to get this image in my own domain path, like $new_img = 'http://mysite.com/some_image_address.JPEG'; I am a PHP beginner so please describe it

Member Avatar
Member Avatar
+0 forum 2

I want to be able to get the html of many different sites and parse them to pull the article text from them, it cant be specific for one site as i want to use it form many sites, what would be the best way of doing this?

Member Avatar
Member Avatar
+0 forum 3

I started with curl and now I'm able to post form data, obtain html pages and all that basic stuff. But I'm unable to analyse individual data in the obtained webpage. Like filtering all the images, videos and things like that. I can do that in Javascript, but that can only be run from a browser, so I want a way to analyse a webpage without a browser. I searched around the web and I found it was called parsing. Can someone explain how it works, and if individual elements in a webpage can be obtained using a parser or …

Member Avatar
Member Avatar
+0 forum 3

I need help in running a program that makes a SLR Parser Table. Here is the code : Code to find first and follow: saved as SLR.h #include<stdio.h> #include<ctype.h> #include<conio.h> #include<stdlib.h> #include<string.h> #include<iostream.h> #define epsilon '^' // since I didn't know how to type epsilon symbol temporily I am using ^ char prod[20][20],T[20],NT[20],c[10][10],foll[10][10],fir[10][10]; int tt,tnt,tp,a; int follow[20][20],first[20][20]; void first_of(char); int count(int j); void rhs(int j); void read_tnt(); int rhs(int j); void read_tnt() { cout<<"For SLR parser: "; cout<<"\nEnter number of terminals: "; cin>>tt; cout<<"\nEnter terminals: "; for(int i=0;i<tt;i++) T[i]=getche(); getch(); cout<<"\nEnter number of Non-terminals: "; cin>>tnt; cout<<"\nEnter Non-terminals: "; for(i=0;i<tnt;i++) …

Member Avatar
+0 forum 0

Hi, I'm only starting my program and I already have this error but I really don't understand which ones are causing this shift/reduce conflict and why. Can please someone help me? it says I have 2 conflict shif/reduce. This is the grammar: [CODE]Start : Declarations/* put your RHS for this rule here */ { } ; /* note that the rule ends with a semicolon */ epsilon: ; Declarations :VarDeclaration2 FunDeclaration FunDeclaration2 { } ; VarDeclaration2 :VarDeclaration {} |epsilon ; FunDeclaration2 :FunDeclaration {} |epsilon ; VarDeclaration :TypeSpecifier IDENTIFIER { } ; FunDeclaration :TypeSpecifier IDENTIFIER | TypeSpecifier IDENTIFIER "[""]" {} ; …

Member Avatar
+0 forum 0

Hi there I have been trying to experiment with Parsing XML using Javascript. For some reason nothing happens. I found this example on W3 schools. Any idea why it's not working? This is my HTML page which contains the Javascript [CODE]<html> <head> <script type="text/javascript"> if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","cd_catalog.xml",false); xmlhttp.send(); xmlDoc=xmlhttp.responseXML; x=xmlDoc.getElementsByTagName("CD"); i=0; function displayCD() { artist=(x[i].getElementsByTagName("ARTIST")[0].childNodes[0].nodeValue); title=(x[i].getElementsByTagName("TITLE")[0].childNodes[0].nodeValue); year=(x[i].getElementsByTagName("YEAR")[0].childNodes[0].nodeValue); txt="Artist: " + artist + "<br />Title: " + title + "<br />Year: "+ year; document.getElementById("showCD").innerHTML=txt; } </script> </head> <body onload="displayCD()"> <div id='showCD'></div> …

Member Avatar
Member Avatar
+0 forum 7

The title says it all; I want to make a simple, not all-over-the-place HTML code. I'm asking for help since I'm still in middle school. I understand a lot of code, but if you give me a from college class explanation, it's not going to help until I get to high school. I'll just put my other question out there; how do you get HTML documents from the internet? Thank you for all suggestions, helpful or not.

Member Avatar
Member Avatar
+0 forum 1

Hello! I am currently working on a text adventure in C++ and could use some help. What I'm trying to do is let the user input a command like the following: 'go kitchen' 'open door with key' and make the game react accordingly. I have a text parser which splits any phrase into 4 tokens. verb, object, preposition, object2. But what I need to do then is somehow compare the input of the user to a list of available and valid commands. Any easy solution would be much appreciated since I have very little experience in programming. so here is …

Member Avatar
Member Avatar
+0 forum 1

Hello guys , I am looking for a HTML parser in C/C++. I am trying to make a movie rater , which take name of movies from a folder and stores it in a file , then sort it according to their rating on net. So ,I am thinking to do it with HTML parser . Please let me know good & fast HTML parser in C/C++. PS: is there any other better ways to do above task like query etc ?

Member Avatar
Member Avatar
+0 forum 1

Hello, I'm doing a project for my Compilers course and I stuck up on this. my project is little, it's a program that allows entering a mathematical equation and identifies and outputs the equations type to the user. I wrote the grammars for it and used Flex to generate a lexical analyzer for it. My problem is, how can I use the generator's file [B]lex.yy.c[/B]( i.e., pass an input string and get the generated tokens) without using the Yacc/Bison tool. I was thinking of creating a little console application that does that but I was lost and didn't know what …

Member Avatar
Member Avatar
+0 forum 1

I have an [URL="http://pantheonarts.host22.com/xml/feed.xml"]RSS feed[/URL] set up using XML on the website I've developed for [URL="http://pantheonarts.host22.com/"]Pantheon Arts Unlimited[/URL]. I'm still fairly new to PHP and MySQL, so I find myself often jumping to various forums looking for answers for what are usually fairly obvious questions. My newest problem, however, I've yet to find an answer without it being "[I]WordPress[/I]." I want to develop the site at least 80% myself and not rely on third-party sources for such a large undertaking. I like having strict control over my code. Anyways. I have an RSS feed running off XML, and I'm parsing …

Member Avatar
Member Avatar
+0 forum 2

Hi, I have a program that generates an outputstream with XML-data. With a socket connection, I have to read multiple XML-files from the inputstream. To read only one XML-file from the inputstream is not a problem, the fact that there are more than one and I have to split up the stream somewhere poses a problem for me. I have been looking all over the internet for a solution, but I haven't found it yet. Hopefully you can help me.. I already obtained the inputstream here.. but now I have to split it up somewhere to read the multiple files …

Member Avatar
Member Avatar
+0 forum 5

The End.