parsing

How to adjust my regex to work with multiline and more complex text?

Background: I've wrote a small library that is able to create asp.net controls from a string. Sample text: Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et {{asp:hyperlink|NavigateUrl="/faq.aspx";Text="FAQ";}} {...

Need to parse ini file to extract values

I have a .ini file with contents of... [template] color1 = 000000 color2 = ff6100 color3 = ff6100 color4 = 000000 And a file with contents below which is called from functions.php which passes in 2 values: $myTheme, which is the name of the theme/template whose colors are being sought and $spot, which is the specific color number bei...

Should I use regex to parse this string of html table data?

What's the best way to parse this data? Should I use regex or something else? The data is in html, but I found it from a website and will be parsing this and only this string (note: string is much longer - over 1,300 instances - only two below) - note I use php & jquery for most web programming. I only need to extract the data in t...

How to parse an eXist xQuery response with php?

Hi, I am trying to find an easy way to parse an eXist response with php without installing third party classes. This is the type of response that I would like to parse : <exist:result xmlns:exist="http://exist.sourceforge.net/NS/exist"&gt; <exist:collection name="xData" path="/db/SBXXX/00000000-00000000/sapData" created="2010-07-15T...

How to combine Regexp and keywords in Scala parser combinators

I've seen two approaches to building parsers in Scala. The first is to extends from RegexParsers and define your won lexical patterns. The issue I see with this is that I don't really understand how it deals with keyword ambiguities. For example, if my keyword match the same pattern as idents, then it processes the keywords as idents....

Is there a way to view php code after the includes and before its parsed?

I may have some gaps in my understanding how it works, but if its like this : client -> apache -> php (brings together all the includes(...) etc..) -> php parses the complete page -> apache -> client then I would like to know how to see the complete page before its parsed. (Im studying cakephp, trying to get a handle on whats called w...

ReSharper search pattern: "Can not parse pattern"

R# 5.1.1751.8 When I perform a pattern search for... catch (Exception e) {} ...I'm shown an error dialog which says "Can not parse pattern". What about that pattern cannot be parsed? What am I doing wrong? ...

Design Pattern - Parsing Role Name (some static, some dynamic)

hi: Sample of roles: building:service:land:water:access-granted building:service:land:water:access-granted (deny) building:namen:bio:water:science: access-granted I have to parse a bunch of growing list of roles whereby I need to obtain details based on some of the attributes. The roles are not defined in a database and my applicati...

When to write a parser using grammar vs. using language featured regular expressions.

In my master's I've seen how to write parsers, compilers using ANTLR. But in the real world, often times we have a requirement of parsing and extracting relevant content from a heavy load of in-coming stream data. Each language has it's own regular expression engine which can be conveniently used to parse the data. Alternatively we can w...

PHP - Parsing XML object created by simplexml_load_string()

I am trying to read an attribute value of the root node of an XML fed into the simplexml_load_string() method in PHP. Here is an example, <user status="Active"> </user> I am trying to read the value of 'status' in the above XML string. --- Here is an update --- Below is the XML Structure, <data status="Active"> <user> <userid>...

Parser Generator or Library that Supports Suffix Agreement

Hi! I'm working on a syntactic parser for some language. But this language requires suffix agreement highly. For example in English a verb must agree with pronoun as I,we,you-do or he,she,it,this-does etc. In this language a verb has different forms for each pronoun. I know in literature this is handled by unification method. But I coul...

How to take whole Html /xhtml file in single string to write ?

I am new in c# , i just want to know is it possible to take whole html document in a single string. i even want to write it in another file. Thanx in advance. ...

"carbon-copy" a c++ istream?

For my very own little parser framework, I am trying to define (something like) the following function: template <class T> // with operator>>( std::istream&, T& ) void tryParse( std::istream& is, T& tgt ) { is >> tgt /* , *BUT* store every character that is consumed by this operation in some string. If afterwards, is.fail() (whi...

SAX XML Parsing in android

enter code here XML Code is - - Radio 200 - ...

WSDL xsd:choice to java ?

Hi, I'm parsing a WSDL which has a xsd:choice. How can I model a xsd:choice on java?, I didn't find a union class or something like that. ...

Regular expression to parse a commented configuration file

Edit: I'm really just curious as to how I can get this regex to work. Please don't tell me there are easier ways to do it. That's obvious! :P I'm writing a regular expression (using Python) to parse lines in a configuration file. Lines could look like this: someoption1 = some value # some comment # this line is only a comment someoptio...

Stanford parser - typed dependencies

I need to handle with possessive dependencies in stanford parser.I read in a mailing list that to use the output format includePunctuationDependencies but i get this exception. Can anyone please give me link to the stanford parser that supports this outputformat? I'm currently using the stanford parser version 9-07-2010 java.lang.R...

Android DOM Parsing Help

I have used XML DOM parsing BUt not able to display the LIST. of attributes..Local,Music,walk, sports....etc How it will code in oncreate() method. pls help me regard this.. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // DownloadLINK(URL); // } // private void DownloadLI...

Json and Gson in Android Application.

Hello Team, Can I have the Information of what is the difference between JSON & GSON. I have read the word GSON at some places while looking for JSON particularly. I don't know the clear difference between the two. Another thing is the Words; "Marshalling" and "Unmarshalling" associated with JSON Parsing, I wonder what they are actual...

Flex XML Tag Attribute Value / Property Parsing

I'll try to ask this in a way that makes some sense. I have an RSS feed, within Flex I have connected to the feed via HTTPService, the XML structure is as follows (not exact, but for the purpose of the question). I am able to walk down the xml and access the data within the title and link nodes with success but when I get the the descri...