Is there a parser for the output from Perl's Text::Table?
Suppose I have a bunch of tables created with Text::Table. Does there exist a parser to convert them back to Perl data structures, or do I have to write my own? ...
Suppose I have a bunch of tables created with Text::Table. Does there exist a parser to convert them back to Perl data structures, or do I have to write my own? ...
This is my first question :). Im writing a little twitter app in PHP that sends a DMs to all your followers. What im trying to do right now is to get the list of followers. So through twitter api and getting all usernames but for some reason this parsing error appear. Im new to php(but not so much to programming), I actually started lea...
How do recursive ascent parsers work? I have written a recursive descent parser myself but I don't understand LR parsers all that well. What I found on Wikipedia has only added to my confusion. Another question is why recursive ascent parsers aren't used more than their table-based counterparts. It seems that recursive ascent parsers ha...
What is the relation between parser combinators and recursive descent parsers? ...
What's the best way to parse messages received from an IRC server with Python according to the RFC? I simply want some kind of list/whatever, for example: :[email protected] PRIVMSG #channel :Hi! becomes this: { "sender" : "[email protected]", "target" : "#channel", "message" : "Hi!" } And so on? (Edit: I want to parse IRC mes...
Straight to the point: I would like to parse the source/DOM of a html page. However i cannot because there is missing information which requires javascript and ajax. I am using C# and .NET. There is a site that uses ajax to browse pages. Theres two sections i am interested in, the wiki and media section. If i have the link to the media ...
I'm thinking about the tokenizer here. Each token calls a different function inside the parser. What is more efficient: A map of std::functions/boost::functions A switch case I thank everyone in advance for their answer. ...
Let's say you have a Boolean rule/expression like so (A OR B) AND (D OR E) AND F You want to convert it into as many AND only expressions as possible, like so A AND D AND F A AND E AND F B AND D AND F B AND E AND F You are just reducing the OR's so it becomes (A AND D AND F) OR (A AND E AND F) OR (...) Is there a property in Boo...
I'm creating a compiler with Lex and YACC (actually GNU Flex and Bison). The language allows unlimited forward references to any symbol (like C#). The problem is that it's impossible to parse the language without knowing what an identifier is. The only solution I know of is to lex the entire source, and then do a "breadth-first" parse, ...
Hi all, We are using NSXMLParser in Objective-C to parse our XML document, which are all UTF-8 encoded. One document has a string "Nestlé" in it (as in ...<title>Nestlé Novelties</title>...). The parser just quit, reporting an error with error code=9, due to the French letter "e" at the end of the word "Nestle". Furthermore, we tried us...
Hello, We're building an "on-demand" feed parsing service (http://superfeedr.com) that developers can plug directly into their own applications. Instead of building your own feed parsing module, and spending days in setting it up and maintaining it, we do the "hard" work for you and our service sends you updates in real-time and standar...
I am attempting to write a CF component that will parse wikiCreole text. I am having trouble getting the correct matches with some of my regular expression though. I feel like if I can just get my head around the first one the rest will just click. Here is an example: The following is sample input: You can make things **bold** or //...
My users upload Word 2007 documents to our site and I'd like to load them into a rich edit control of some kind so the users can make modifications/ comment, etc. What mechanisms are available to: load the Word document via ASP.NET, and parse/format/display the document in a rich editing control? Also, what kinds of rich editing con...
My objective is to extract the text and images from a PDF file while parsing its structure. The scope for parsing the structure is not exhaustive; I only need to be able to identify headings and paragraphs. I have tried a few of different things, but I did not get very far in any of them: Convert PDF to text. It does not work for me a...
Hi Guys, Can someone help me to extract int timestamp value from this string "\/Date(1242597600000)\/" in Objective C I would like to get 1242597600000. Thx ...
I've been parsing poker hand histories for the past year and have learned quite a deal about parsing in general. We started with regexes but quickly realized that wouldn't scale easily. We skipped languages from ruby to c++ and finally came to grips that it was the algorithim that had to change. We picked up Boost::Spirit and watched o...
I am saving user-submitted HTML (in a database). I must prevent Javascript injection attacks. The most pernicious I have seen is the script in a style="expression(...)". In addition to this, a fair amount of valid user content will include special characters and XML constructs, so I'd like to avoid a white-list approach if possible. (L...
I have to parse a bunch of stats from text, and they all are formatted as numbers. For example, this paragraph: A total of 81.8 percent of New York City students in grades 3 to 8 are meeting or exceeding grade-level math standards, compared to 88.9 percent of students in the rest of the State. I want to match just the 81 a...
I'd like to find a tree parser generator to help me transform ASTs for a compiler written in C++. After some quick research I found out about ANTLR (which can be targeted to work with C but not C++). I also found a website that warns against using ANTLR with C++: http://www.bearcave.com/software/antlr/antlr_treeparse.html. The article...
Hi, I am using the C# Yaml Parser mentioned on Code Project Site If my Yaml looks like the following - id: tagid tag: - name: tagname value: tagvalue After it has been successfully parsed, how do I access the Data Items so that I can do some further processing. For example if I need to get the value of "name" what code woul...