ply Questions

6

Solved

Ok, so I've asked a bunch of smaller questions about this project, but I still don't have much confidence in the designs I'm coming up with, so I'm going to ask a question on a broader scale. I am ...
Dilantin asked 31/5, 2010 at 18:36

2

Solved

I'm doing a lexer as a part of a university course. One of the brain teasers (extra assignments that don't contribute to the scoring) our professor gave us is how could we implement comments inside...
Heeled asked 5/10, 2020 at 14:37

3

Solved

I'm working with a fairly simple parser in PLY, and one of my rules takes on the following form: def p_things(p): ''' things : thing things things : thing ''' p[0] = [p[1]] if len(p) == 3: ...
Slake asked 20/6, 2011 at 20:1

4

Solved

I have a .PLY file that contains a 3D Point Cloud: I want to plot it and visualize it in Python. The .PLY file contains ONLY vertex and NOT faces. Could you indicate me a simple Python libr...
Inchmeal asked 21/6, 2018 at 9:58

2

Solved

I am using ply and have noticed a strange discrepancy between the token re match stored in t.lex.lexmatch, as compared with an sre_pattern defined in the usual way with the re module. The group(x)'...
Mammary asked 17/9, 2011 at 1:16

2

Solved

I'm working on a simple translator from SQL INSERT statements to a dataset XML file to be used with DbUnit. My current definition looks like this: def t_INSERT(token): r'INSERT\s+INTO' return t...
Psychosexual asked 10/5, 2012 at 16:4

1

I am writing my own parser with PLY. I want to encapsulate the lex and yacc respectively Here is the code for class Lex: class Lex: tokens = ( 'NAME', 'NUMBER', ) literals = ['=', '+', '-',...
Marela asked 8/7, 2016 at 8:50

1

I was trying to parse the function definition for the python language with PLY. I am encountering issues related to the indentation. For instance for a for statement, I would like to be able to kno...
Ziguard asked 4/11, 2013 at 17:55

2

Solved

I am trying to run the first part of a simple example of the PLY but I encounter a strange error. When I run the following code, it gives me an error regarding lex.lex() Anyone knows what the prob...
Withoutdoors asked 22/2, 2016 at 22:52

6

Solved

I'm using an older version of PLY that uses the md5 module (among others): import re, types, sys, cStringIO, md5, os.path ... although the script runs but not without this error: DeprecationWar...
Parous asked 18/1, 2010 at 7:13

5

Solved

I am using PLY in a command line application that I package as a Python egg to be installed via pip. Everytime I run my script from the command line, I see the following message: "Generating LALR ...
Polygyny asked 28/9, 2012 at 17:47

3

Solved

Background: As a short project over winter break, I'm trying to implement a programming language called Axe (designed for graphing calculators) using Python and PLY. A brief note: the language allo...
Oatis asked 27/12, 2011 at 7:58

2

My objective is to parse like Python does with strings. Question: How to write a lex to support the following: "string..." 'string...' """multi line string \n \n end""" '''multi line string \n \...
Pudens asked 12/12, 2013 at 12:8

2

Solved

Forgive me if I have the incorrect terminology; perhaps just getting the "right" words to describe what I want is enough for me to find the answer on my own. I am working on a parser for ODL (Obje...
Sheathbill asked 27/2, 2013 at 2:23

3

Solved

im using the python module ply.lex to write a lexer. I got some of my tokens specified with regular expression but now im stuck. I've a list of Keywords who should be a token. data is a list with a...
Cosby asked 31/8, 2012 at 14:50

2

Solved

I'm using ply as my lex parser. My specifications are the following : t_WHILE = r'while' t_THEN = r'then' t_ID = r'[a-zA-Z_][a-zA-Z0-9_]*' t_NUMBER = r'\d+' t_LESSEQUAL = r'<=' t_ASSIGN = ...
Ait asked 16/2, 2011 at 21:9

3

Solved

I am working on a simple SQL select like query parser and I need to be able to capture subqueries that can occur at certain places literally. I found lexer states are the best solution and was able...
Kortneykoruna asked 24/3, 2012 at 2:35

1

Solved

I am trying to parse a string using the yacc parser provided in the PLY library for Python. The parser itself is very long, but the problem that i am having is that it always gives me the same erro...
Clipper asked 22/11, 2011 at 0:53

1

Solved

I know there are other tools out there to parse SQL statements, but I am rolling out my own for educational purposes. I am getting stuck with my grammar right now.. If you can spot an error real qu...
Mcdonough asked 8/9, 2011 at 22:57

1

Solved

The empty production rule nonterminal -> epsilon is useful in lex-yacc LR bottom up parser generators (e.g. PLY). In what context should one use Empty productions in PEG parsers e.g. pyparsi...
Sinus asked 4/5, 2011 at 6:18

4

Solved

I am writing a parser using ply that needs to identify FORTRAN string literals. These are quoted with single quotes with the escape character being doubled single quotes. i.e. 'I don''t understand...
Drastic asked 26/1, 2010 at 22:40
1

© 2022 - 2024 — McMap. All rights reserved.