hi,
I am writing an email module for my web app that sends a html email to a user on completion of a task such as signing up. Now as the formatting of this email may change I've decided to have a template html page that is the email, with custom tags in it that need to be replaced such as %fullname%.
My function has an array in the fo...
I'd like to parse REXX source so that I can analyse the structure of the program from Java.
I need to do things like normalise equivalent logic structures in the source that are syntactically different, find duplicate variable declarations, etc. and I already have a Java background.
Any easier ways to do this than writing a load of cod...
I'm working on a script for work to extract data from an old template engine schema:
[%price%]
{
$54.99
}
[%/price%]
[%model%]
{
WRT54G
}
[%/model%]
[%brand%]{
LINKSYS
}
[%/brand%]
everything within the [% %] is the key, and everything in the { } is the value. Using Python and regex, I was able to get this far: (?<=[%)(?P\w*?)(?=\%...
I'm developing a small programming language based mostly of the C99 standard and I've already written a fairly decent lexer in java and now I'm looking to generate a Java Parser from the grammar. I know there's Bison, but that seems to only generate C code. I'm looking for a application that will allow me to input my grammar and create a...
Which lexer/parser generator is the best (easiest to use, fastest) for C or C++? I'm using flex and bison right now, but bison only handles LALR(1) grammars. The language I'm parsing doesn't really need unlimited lookahead, but unlimited lookahead would make parsing a lot easier. Should I try Antlr? Coco/R? Elkhound? Something else?
...
I need to process XML documents of varying formats into records in a MySQL database on a daily basis. The data I need from each XML document is interspersed with a good deal of data I don't need, and each document's node names are different. For example:
source #1:
<object id="1">
<title>URL 1</title>
<url>http://www.one.com&...
I'm writing a lexer/parser for a small subset of C in ANTLR that will be run in a Java environment. I'm new to the world of language grammars and in many of the ANTLR tutorials, they create an AST - Abstract Syntax Tree, am I forced to create one and why?
...
How to parse in easy way a .h file written in C for comments and entity names using Python?
We're suppose for a further writing the content into the word file already developed.
Source comments are formatted using a simple tag-style rules.
Comment tags used for an easy distinguishing one entity comment from the other and non-documentin...
I need to be able to parse an xml file inside photoshop, using javascript. I tried activex but it didn't work. How do I go about parsing it. Does javascript itself has an xml parser?
...
Hi Folks,
My problem is that I am trying to run a problem that I coded using a flex-bison scanner-parser. What my program is supposed to do is take user input (in my case, queries for a database system I'm designing), lex and parse, and then execute the corresponding actions. What actually happens is that my parser code is not correctly...
Hello,
I'm trying to load a xml document into an object XPathDocument in C#.
My xml documents include this line:
trés dégagée + rade
and when the parser arrives there it gives me this error:
"An error occurred while parsing EntityName"
I know that's normal cause of the character "é". Does anybody know how can I avoid this error... My ide...
Hi - this question feels like it would have been asked already, but I've not found anything so here goes...
I have constructor which is handed a string which is delimited. From that string I need to populate an object's instance variables. I can easily split the string by the delimited to give me an array of strings. I know I can simply...
I created test.l, input to flex, which ends with the main function.
When the main function is implemented as:
int
main(void)
{
yylex();
return 0;
}
I have no problem.
I want to trick the parser into believing that the first character is always a semi-colon, so I implemented main as
int
main(void)
{
unput(';');
yylex(...
Hi,
how do I parse a mail in Cocoa?
I've read the NSScanner tutorial, but struggled.
Do you know any better way than NSScanner?
Is there any sample code?
My example:
http://pastie.org/private/pordph27stkwkyvrx2tiq
Regards
...
Does anyone know of a .NET library/script for parsing Visual Studio solution (SLN) files?
I would like to write an app that merges multiple solutions into one while saving the relative build order.
...
I'm rather new to C# and have a user input string (valid I hope.)
This string will make up multiple sections and subsections of information.
For example:
1-7 will //represent values 1 2 3 4 5 6 7
3:.25:7 //will be the numbers contained between 3 and 7 in increments of .25
// (3 3.25 3.5 3.75 4 ... 6.75 7)
1,4,5 //will repre...
Hi,
I've been running into problem after problem trying to use the a third party HTML editor to do what (I hoped) was a simple operation. Because of these problems, I'm looking for recommendations for an alternative HTML parser I could use to perform the operations.
Here's my situation, I have span tags in my html (with an ID attribut...
I have to parse a series of web pages in order to import data into an application. Each type of web page provides the same kind of data. The problem is that the HTML of each page is different, so the location of the data varies. Another problem is that the HTML code is poorly formatted, making it impossible to use a XML-like parser.
So...
from BeautifulSoup import BeautifulStoneSoup
xml_data = """
<doc>
<test>test</test>
<foo:bar>Hello world!</foo:bar>
</doc>
"""
soup = BeautifulStoneSoup(xml_data)
print soup.prettify()
make = soup.find('foo:bar')
print make
# prints <foo:bar>Hello world!</foo:bar>
make.contents = ['Top of the world Ma!']
print make
# prints <foo:b...
I've got a string with a bunch of multi-letter codes in it and I'd like to parse it out according to those codes. I'm not sure how to make it look at more than one character to determine if it forms part of a code.
My string looks like this:
BBCTEEBOBBB
and I want to parse out these instances:
E
BB
CT
BOB
So the result should be out...