What is Parse/parsing?
Hi Just wondering what exactly is a Parseing or parsing? especially related to Java. Why are they used? for example: Integer.parseInt, String parse.String etc Thank you ...
Hi Just wondering what exactly is a Parseing or parsing? especially related to Java. Why are they used? for example: Integer.parseInt, String parse.String etc Thank you ...
How do I use C# regular expression to replace/remove all HTML tags, including the angle brackets? Can someone please help me with the code? ...
I'm building a Javascript preview function for a blog back-end (much like the one used on this website), and I'd like to be able to parse some custom tags that normally get parsed by PHP. I am wondering if it's possible to use the JS XML parser to parse content from a textarea that would look like: <img=1> Use for <url=http://apwit.com...
I want to write a Rails app to assist me with my online Poker. I play on PokerStars, and there is text data available for each hand that is played. The format it comes in is this: PokerStars Game #27457662450: Tournament #157033867, Freeroll Hold'em No Limit - Level IV (50/100) - 2009/04/24 20:39:44 ET Table '157033867 830' 9-max Seat ...
Hello everyone. This is my first post on this rather spiffing website so go easy on me if this has been discussed elsewhere (I can't find it if it has). I'm using the JQuery URL parser plugin found here: http://projects.allmarkedup.com/jquery_url_parser/ I can get it to do what I want but the code is rather inefficient. I have a coll...
I need to write a simple parser to a sort of Domain Specific Language. It needs to have basic arithmatics with proper operators evaluation order and a syntax to call functions of the underlying environment which can be overloaded. What is the simplest way to write such a parser? Is there something I can adapt or use out of the box? I'm w...
Been Googling around without finding much at all, so does anyone know of a class or library that helps you parse any sort of language, like a Domain Specific Language (I'm creating one, so I'm flexible in what the syntax and format can be) into either PHP code or some helpful struct or a class hiearchy or ... ? Anything goes at this poin...
Are there any existing libraries in existence that will parse a datetime from a plaintext phrase? I'm looking for something similar to Remember The Milk or Outlook, where the user can enter "next tuesday at 6pm" or "tonight at 7" and the library can spit out {4/28/2009 18:00:00} or {4/25/2009 19:00:00}. I'm considering writing my own, bu...
Can anyone help me by explaining how to extract image urls from HTML File in C# ...
Executing that: $.post( "/url/to/method", { }, function(data){ var obj2 = eval("("+$(data).children()+")"); // OR var obj = $.evalJSON($($(data).children())); // Jquery-json $body = $("#AAA"); $body.html(obj.fied); }, "xml" ); while turn into a "missing ] after element list" (at row 5 or 6) error in firebug. The JSON ...
I am teaching myself to use JavaCC in a hobby project, and have a simple grammar to write a parser for. Part of the parser includes the following: TOKEN : { < DIGIT : (["0"-"9"]) > } TOKEN : { < INTEGER : (<DIGIT>)+ > } TOKEN : { < INTEGER_PAIR : (<INTEGER>){2} > } TOKEN : { < FLOAT : (<NEGATE>)? <INTEGER> | (<NEGATE>)? <INTEGER> "." <...
Hi all, I'm writing an experimental language, which is very close to pseudocode, for fun and to learn more about C++. One of the problems is that I need to parse some grammar, and my search to find a good C++ grammar parser has been unsuccessful (I couldn't find anything). What I want to accomplish is this: set a to 4 And I want th...
Hello all. I've got a set of function definitions written in a C-like language with some additional keywords that can be put before some arguments(the same way as "unsigned" or "register", for example) and I need to analyze these lines as well as some function stubs and generate actual C code from them. Is that correct that Flex/Yacc ...
I've got a question on failure function description from "Compilers: Principles, Techniques, and Tools" aka DragonBook Firstly, the quote: In order to process text strings rapidly and search those strings for a keyword, it is useful to define, for keyword b1b2...bn, and position s in that keyword , a failure function, f (s) ... ...
Hello all, I am looking to implement a simple forward indexer in PHP. Yes I do understand that PHP is hardly the best tool for the task, but I want to do it anyway. The rationale behind it is simple: I want one, and in PHP. Let us make a few basic assumptions: The entire Interweb consists of about five thousand HTML and/or plain-text...
I'm writing a function using ICU to parse an Unicode string which consists of kanji numeric character(s) and want to return the integer value of the string. "五" => 5 "三十一" => 31 "五千九百七十二" => 5972 I'm setting the locale to Locale::getJapan() and using the NumberFormat::parse() to parse the character string. However, whenever I pass...
Of course an HTML page can be parsed using any number of python parsers, but I'm surprised that there don't seem to be any public parsing scripts to extract meaningful content (excluding sidebars, navigation, etc.) from a given HTML doc. I'm guessing it's something like collecting DIV and P elements and then checking them for a minimum...
Is there any existing JSON parser which can be used from VB6? I could obviously write my own parser, but I don't want to reinvent the wheel if I don't have to. Thanks! ...
I'd like some help for detecting the following expressions with RegEx string "(x/x)" where x is any number from 0-999. string "x of x" where x is any number from 0-999. Typically, the string is a marker for a set, i.e. 4 of 10 things, or (3/5) where the first number is the item and the second number is the total. Thanks ...
I wrote a file parser for a game I'm writing to make it easy for myself to change various aspects of the game (things like the character/stage/collision data). For example, I might have a character class like this: class Character { public: int x, y; // Character's location Character* teammate; } I set up my parser to read in ...