Most voted "parser" questions
It refers to the algorithm that breaks some artifact, commonly a text, into elements and captures the relationship between these elements. This tag is not for parse error questions.
Learn more…57 questions
Sort by count of
-
46
votes5
answers9524
viewsReceive an expression and calculate in C
I am developing this program that should receive an expression from the user and do the calculation. Ex: Insert an expression 3*5-1 14 My problem is how to handle the user-sent expression. I was…
-
40
votes5
answers3496
viewsWhat are the main advantages and disadvantages of using an LL parser or an LR?
I’m building a parser for a programming language. Grammar does not need to meet all the complexities of a language like C++ or Lisp. I have a moderate knowledge of language building but little…
-
40
votes6
answers4038
viewsWhat is lexical analysis?
I was taking a look at the source code of a well-known php library, called Twig (is a template engine, with its own syntax), and I came across classes, interfaces and methods, such as Lexical, Lex…
-
17
votes2
answers1365
viewsShould I use a parser generator or should I develop my own code to do "parse" and "lex"?
Obviously the question should not be interpreted "to the letter". I do not want anyone to decide for me, I need to know the perks and disadvantages to use one method or the other. When should I wear…
parser compiler-project lexical-analysis language-designasked 10 years, 10 months ago Maniero 444,682 -
11
votes2
answers262
viewsHow to parse syntactically malformed HTML?
As part of a procedure, I need to extract the contents of a table present on a page. I’m using Curl to get the raw HTML data and the Simple HTML DOM Parser to parse and process HTML. <?php //…
-
9
votes2
answers130
viewsHow does the interpretation of HTML code work?
I’m making a tree to derive an HTML code. And I’m treating some particular cases. And one of those cases is just when someone opens a tag and doesn’t close it: <html> <body> <div>…
-
6
votes1
answer518
viewsHow to make a program to calculate constant mathematical expressions
I have a job to build an algorithm that calculates expressions coming from a TXT file in this format. 10+20*(30)/ 25. I know this is a recursive descending analyzer, but I have no idea where to…
-
5
votes1
answer761
viewsWhat is the best way to read an XML in PHP and insert it into the Database?
I am reading XML files of about 50M of information (a hundred thousand records, could be more), and I have two classes implemented XML reading one DOM and another SAX. I’m having a problem in terms…
-
5
votes1
answer853
viewsMount array with txt data
I’m trying to find a way to assemble a table with the data of a txt, but I don’t know how to separate the values in the array, since they are separated by several spaces, but are identified by…
-
5
votes3
answers907
viewsSum array in javascript currency
I need help to convert and add formatted currency fields coming in this format "1.568,78" I have a code that sums an array of parcels and checks if it is equal to the total value of the invoice that…
-
4
votes1
answer155
viewsSyntactic Reader (Extension of Visual Studio 2013)
By syntactically reading a language in a Visual Studio extension project I can already read the following: <span class="myclass"></span> It is relatively easy to manage read states…
-
4
votes2
answers299
viewsGet XML tag data
I have an XML with the following format: <dados-cad> <nome>Wender</nome> <data>2805094</data> <code>311</code> </dados-cad> How do I in PHP to get…
-
4
votes3
answers1189
viewsPython NLTK method that returns a syntactic tree
I’m using the NLTK Forest library and I saw there that has some sentences with parse (syntactic tree) already created. However, I would like a method that from a new phrase it creates the parse in…
-
4
votes1
answer1827
viewsHow to replace the HTML content of a div using php Domelement
I’m trying this way libxml_use_internal_errors(true); //pegar o conteudo de um pagina web $doc = new DomDocument(); $doc->loadHTMLFile('http://www.astralsaudeambiental.com.br/'); $div =…
-
4
votes1
answer299
viewsHelp with PHP repeat structure - PARSER - simple_html_dom.php
I’m doing a parser with simple_html_dom.php where I pull all the links from a given page. I can pull the links and assign to an array, here comes the problem: this page has a maximum display limit…
-
4
votes0
answers40
viewsWhat are parser combinators?
Recently, studying on techniques of Parsing, found out about parser combinators, which seems to be a more functional approach to realize the parse of a sequence of characters. What is a parser…
-
3
votes2
answers1190
viewsHow to perform an algebraic expression on a string in C
My program has the following objective:: Given a function, my program replaces the function'X(s)' by any number. The code below exemplifies what was said. //funcao a ser trabalhada char funcao[150]…
-
3
votes1
answer240
viewsHow is a scope block identified in a language like Python?
How a language identifies a block where it does not use keys to open and close? function exemplo(){ // ... } I believe that in the example above the parser create a scope block from the keys, but in…
-
3
votes1
answer853
viewsWhat is DOM Parser?
Reading about regular expression I saw a recurring term, DOM parser, and I had doubts: What is DOM Parser? How it works? Every language has?
-
3
votes2
answers1016
views -
3
votes1
answer355
viewsParsing columns of numbers from a CSV file in C
Hello, Good Night I am with a file . CSV simple, containing only two columns, separated by comma and by the new line, as an example: 0.001,-9.623 0.098,2.540 1.000,-1.002 And I need to separate them…
-
2
votes1
answer70
viewsHow to convert XML to Swift objects?
How can I convert XML request replies to objects in Swift format, just like Objectmapper does with JSON for objects?
-
2
votes1
answer416
viewsCopy HTML from a page display in a textview
I need a direction. What method to "download" a page’s html (text only) for example: https://pt.wikipedia.org/wiki/Tancredo_Neves and display it in a textView?…
-
2
votes0
answers32
viewsWhat are and what are the main differences between pull Parsing and push Parsing?
I was looking for a parser for Markdown implemented in Rust and I ended up encountering two terms which I do not have the slightest familiarity: pull Parsing push Parsing As far as I know, it’s two…
-
2
votes1
answer280
viewsHTML Parser in Xamarin
I am developing an application with Xamarin to make login in a web account using HTTPWebRequest and filter relevant site information to an app. I’ve already developed the part of doing login, now I…
-
2
votes0
answers219
viewsHow to parse XML with namespace and prefix in PHP using Simplexml?
The.xml data file: <?xml version="1.0" encoding="utf-8" ?> <rsp status="ok"> <ArrayOfContact xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"…
-
2
votes2
answers98
viewsUse the number of characters obtained in a regular expression sentence in string substitution
I am doing a Markdown parser as part of a study on regular expressions, and I would like to use the amount of characters obtained in an excerpt of the expression, as a basis for string substitution,…
javascript regex parser ecmascript-6 ecmascript-5asked 9 years, 3 months ago Daniel de Andrade Varela 267 -
2
votes2
answers247
viewshow to parse a json return with complex object
How do I parse a return json where I have optional fields, such as phone, the user can have more than one as residential, mobile and phone to message, in this case if the user informed the phone he…
-
1
votes1
answer113
viewsGOTO and ACTION table generator
Regarding LR Parser, I fear the following Wiki: http://pt.wikipedia.org/wiki/Analisador_sint%C3%A1tico_lr#Algorithm There is a canonical algorithm to generate the GOTO and ACTION tables. I searched,…
-
1
votes1
answer92
viewsUse the data obtained in the parse of my Web Service to turn into a chart on Android
I have a web service that returns me some values, for example now is this way the answer of my parse: The parse I did to get the filtered values was this: String valFormaOutros =…
-
1
votes1
answer225
viewsHow to perform with parser authentication on a site that needs to login and parse its HTML content?
I need to parse the content of HTML tables of a website, but to access the page it is necessary to login. How do I parser this login, this authentication? It could be any parser. I’ve looked, but I…
-
1
votes1
answer139
viewsExecute commands in a C++ string
I have commands in a string something like: string comm = "int x; cout << \"Digite um número\"; cin << x;"; My idea is to execute the commands that are in this string, having the result…
-
1
votes0
answers47
viewsConvert XML data to SQL Insert
i have a file with some data in XML format example: <Row> <Data>BARRA DIRECAO AXIAL REGULAVEL</Data> <Data>000216</Data> <Data>FORD - EXPLORER 95/ RANGER…
-
1
votes1
answer784
viewsDismember full numerical expression in C
Hello; I have a code that should be done in the C language, which is to receive a numerical expression, including the result of it, for example: "20+30=50", which will be stored in a string. After…
-
1
votes2
answers247
viewsParse HTML regex problem
Well the doubt I have is this, I need to get the following excerpt of HTML right below: HTML: <section class="ovw-summary"> <div class="ovw-summary__balance balance-amounts">…
-
1
votes0
answers35
viewsParser HTML DOM OR REGEX PHP
I got the following html that the function Curl get back to me <div class="balance-amounts box-container mp-box-shadow bg-trama"> <div class="ch-g1-2"> <dl…
-
1
votes0
answers41
viewsErrors Accentuation Querypath
I’m using one of the recommended Ibraries in this answer, Querypath. To get the data I’m using Guzzle. However, I am having problems in the return of data (accentuation), it is replacing the…
-
1
votes1
answer3097
viewsHow to create a Parser in Python?
For a project with file handling, I wanted to convert from "CFG" to "XML", and I believe that in Python I have no support for either of these two types. There was a colleague who made the…
-
1
votes0
answers114
views -
1
votes1
answer73
viewsDisplaying the tags of a web page with indentation proportional to the depth of the element in the document tree structure
Issue: Develop the Myhtmlparser class as an Htmlparser subclass which, when fed with an HTML file, displays the names of the start and end tags in the order they appear in the document, and with a…
-
0
votes2
answers1208
viewsHow to save variables to be used in the next . Java?
My main (parser) code is this way: public class pFormasDePagamento { public static void parseXML(String xml) throws ParserConfigurationException, SAXException, IOException { InputSource is = new…
-
0
votes1
answer140
viewsRegular expression when there are equal strings
I need to take the value "R$ 0,00" in this string with a regular expression. I really don’t understand expressions, I only know the basics of the basic. There are several other values on the page…
-
0
votes0
answers40
views -
0
votes2
answers69
viewsI need a parser-building tool
So, first I need a parse building tool, I don’t know exactly what it is and where I think, if possible preferably in the Python language. I will use this tool in order to implement an expression…
-
0
votes0
answers251
viewsParse a page
I am trying to get the information from a page through the url. I am developing in symfony and using simple_html_dom or Crowler. But I’m nowhere near doing what I need to do. The page I’m accessing…
-
0
votes1
answer1407
viewsHow best to use templates in Codeigniter 3
I am using version 3 of codeigniter and inserting the concept of templates through the PARSER library, according to the CI documentation itself…
-
0
votes0
answers86
viewsconvert json data to string or array in php
I have this json and would like to know how to convert it to an arrag/string {'texto_mensagem': {'texto': 'Mensagem de envio'}, 'numero_celular': [{'numero': '5537988440956'}, {'numero':…
-
0
votes1
answer334
views -
0
votes1
answer129
viewsHow to turn email object into Stream, Buffer or String?
I’m making an email application and my server is being made in Hapijs, and I’m having trouble taking the email and turning it into a String, Buffer or Stream. I want to turn to these formats because…
-
0
votes1
answer170
viewsParsing NLP with external list
Parsing: An input text that will go through grammar and output are all the inputs that grammar finds in the text. The problem is that my non-terminals are files from external lists and I can’t see a…