Questions tagged as 'parser'

6
answers

What is lexical analysis?

I was taking a look at the source code of a known php library, called Twig (it's a template engine, with its own syntax), and I came across classes, interfaces and methods like Lexical , Lex and LexInterface . I gave...
asked by 16.02.2016 / 18:36
5
answers

Receive an expression and compute in C

I'm developing this program that should receive an expression from the user and do the calculation. Ex:    Enter an expression       3 * 5-1       14 My problem is how to handle the expression sent by the user. It was recommended to...
asked by 18.02.2014 / 20:22
2
answers

How to analyze malformed HTML syntactically?

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 render HTML. <?php // (...) require_once('simple_html_dom.php'); //...
asked by 29.01.2015 / 17:57
1
answer

How to make a program to calculate constant mathematical expressions [duplicate]

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 that this is a recursive descending parser, but I have no idea where to start studying and how to do the pr...
asked by 27.10.2015 / 23:36
3
answers

Adding array in currency javascript

I need some help to convert and add fields formatted as currency coming in this format "1,568,78" I have a code that sums an array of plots and checks if it is equal to the total phallus of the invoice I got here after several queries in user...
asked by 30.11.2015 / 03:27
1
answer

What is the best way to read an XML in PHP and insert it in the Database?

I am reading XML files of about 50M of information (about a hundred thousand records, may be more), and I have two classes read XML read from a DOM and another SAX. I'm having a problem in terms of runtimes, take me longer than 10 minutes, ma...
asked by 17.06.2014 / 15:34
1
answer

Mount array with txt data

I am trying to find a way to set up a table with the data of a txt, but I do not know how to separate the values in the array, since they are separated by several spaces, but are identified by fields (Name: : ...); Example of a txt file: C...
asked by 21.08.2014 / 20:16
2
answers

Get tag data in XML

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 for me to just grab the content th...
asked by 07.10.2014 / 03:52
3
answers

Method inside NLTK in python that returns a syntax tree

I'm using the NLTK Forest library and I saw there some parse (parse tree) sentences already created. However, I would like a method that from a new sentence it creates the parse in Portuguese. Examples: I use it today floresta.parsed_sents(...
asked by 29.11.2015 / 13:55
1
answer

Help with PHP Replication Structure - PARSER - simple_html_dom.php

I am making a parser with simple_html_dom.php where I pull all the links of a certain page. I can pull the links and assign to an array, then the problem comes up: This page has a maximum display limit of 36 items per page. items i...
asked by 19.05.2015 / 15:39