Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
32 views

I'm using Parboiled (in Kotlin) to implement a grammar like DOT, where an identifier (ID) can be: a letter or underscore followed by letters/digits/underscores (e.g. abc, _a1) a number (e.g. 123) I ...
Saku's user avatar
  • 395
1 vote
1 answer
158 views

I am looking at updating an old project that contained a YACC parser generator for parsing a specific file type. I want to improve the performance of this tool and was considering updating the parser. ...
jlewis's user avatar
  • 11
0 votes
0 answers
33 views

I'm writing a grammar for a small interpreter in PLY. The part I am working on and where I am having problems is the one that refers to expressions, since this can contain both access to properties ...
Luis's user avatar
  • 17
1 vote
0 answers
107 views

There are many parser generators for C#, but all that I've found laud the fact that there is no build step. As someone building a redistributable, trimmable, AOT optimized library, that is a downside. ...
Lilith River's user avatar
  • 16.5k
1 vote
1 answer
66 views

I have a problem with my PEG grammar in PHP that use php-peg (the project have more recent fork that is publish to packagist). My project is a fork of an expression parser that I want to replace with ...
jcubic's user avatar
  • 67.1k
0 votes
1 answer
87 views

I was using RE/flex lexer for my project. In that, I want to match the syntax corresponding to ('*)".*?"\1. For eg, it should match "foo", ''"bar"'', but should not match ...
Sourav Kannantha B's user avatar
1 vote
1 answer
262 views

I'm trying to parse SQL INSERT statements like: INSERT INTO `Album` (`Title`, `ArtistId`) VALUES ('Blue Moods', 89); using the following grammar written for Nearley: main -> statement:* statement ...
Rene Saarsoo's user avatar
1 vote
1 answer
129 views

I'm trying to extent the SQL language of SQLite at one point (file parse.y). I have a parsing conflict, however the lemon parser does not show anything besides a random "1 parsing conflicts."...
benjist's user avatar
  • 2,937
0 votes
1 answer
153 views

Here is a simple but very common grammar rule case in EBNF format, the Statements is a none terminal symbol and Statement is none terminal symbol: Statements ::= (Statement ';')* After converting ...
Swordow's user avatar
  • 35
-1 votes
1 answer
355 views

Say I have a grammar like this: match start match first match rule a match rule b match a match string, "a" match b match string, "b(" match optional match ...
Lance Pollard's user avatar
1 vote
1 answer
397 views

I need a way of generating parsers for all deterministic context-free grammars. I know that every deterministic context-free grammar can be parsed by some LR(k) parser. The problem is that I need to ...
Joshua Wise's user avatar
0 votes
1 answer
93 views

I'm creating a grammar in jison This is my jison file: sgr.jison /* AUX VARIABLES */ %{ var contratos = "(E1:ENTIDADE)-[C:CONTRATO] -> (E2:ENTIDADE)"; var dataArray = {}; function ...
أنيسيتو روي's user avatar
0 votes
1 answer
278 views

I'm building a parser for SML using ANTLR 4.8, and for some reason the generated parser keeps choking on integer literals: # CLASSPATH=bin ./scripts/grun SML expression -tree <<<'1' line 1:0 ...
D. Ben Knoble's user avatar
0 votes
1 answer
224 views

I am feeding a (generated) grammar to Beaver parser generator. Multiple shift-reduce conflicts are caused by it seems like the dangling else problem in this rules: Condition = IF LPAR Expression....
Hawk's user avatar
  • 2,132
0 votes
0 answers
133 views

I have pickled a numpy array which contains cosine similarity matrix i have 8 GB Ram in my pc but whenever i want to use that pickled matrix i have to load it completely into the memory and it takes ...
Hassan Abbas's user avatar
1 vote
1 answer
96 views

I know how to parse grammars like this: E -> E '*' E E -> E '+' E E -> N N -> '0' N -> '1' But what if I have the following example grammar (with a "regex repitition"): E -> 'e' S -...
Hexception's user avatar
2 votes
0 answers
514 views

I've been trying to set up a rather simple math parser, and it's been working fine. Only I can't figure out how to put in implied multiplication. I've been using lark as an lalr(1) parser. Here's ...
weakit's user avatar
  • 236
0 votes
1 answer
675 views

This is my current error handling function: public void yyerror(String error) { System.err.println("Error: "+ error); } This is the default error function I found on the BYACC/J homepage. I can't ...
Hari's user avatar
  • 143
0 votes
1 answer
142 views

I'm trying to implement parenthesis in my parser but i got conflict in my grammar. "Conflict in grammar: multiple actions possible when lookahead token is )" Here is simplified version of it: // ...
user avatar
3 votes
3 answers
2k views

How can I write a rule to parse C++ comments either on a line alone or after other code? I've tried lots of combinations, the latest one being: ?comment: "//" /[^\n]*/ NEWLINE
João M. S. Silva's user avatar
0 votes
1 answer
864 views

I am trying to write a LL(1) parser generator and I am running into a issue with grammars which I know to be LL(1) but I cannot factor them properly. For example consider the grammar: S -> As Ao ...
AltF4's user avatar
  • 86
-4 votes
1 answer
828 views

Using the parser generator nom, how can I write a parser which extracts the difference of the minus sign in the terms 1-2 and 1*-2 ? In the first example, I expect the tokens 1, - and 2. In the ...
Matthias's user avatar
  • 1,215
1 vote
1 answer
970 views

I'm trying out the happy parser generator of Haskell. After generating the module in happy.hs (no problem while generating!), I run the command ghc happy.hs, and I get the error: Line 297: parse error ...
code2828's user avatar
3 votes
1 answer
488 views

I try a bit the parser generators with Haskell, using Happy here. I used to use parser combinators before, such as Parsec, and one thing I can't achieve now with that is the dynamic addition (during ...
Foxy's user avatar
  • 1,295
0 votes
1 answer
411 views

I am trying to make a simple calculator using Jacc (a parser generator). I first need to create an AST and visit its nodes to make a Graphviz graph of it and later evaluate it. In my Jacc file I can'...
Anonimista's user avatar
0 votes
2 answers
501 views

I am planning to implement a meta language on top of Xtext. In other words, I am using the Xtext grammar to define my own meta language. This meta language can then be used to define a language (using ...
user2035039's user avatar
0 votes
1 answer
384 views

I'm generating listeners in Python, but any language is ok for answers or comments. I need to know if there's some reference to where in the parsing tree, or even better, in the token stream or in ...
Petruza's user avatar
  • 12.4k
1 vote
1 answer
2k views

I'm trying to covert this BNF grammar for validating boolean expression which is currently being used in Swift. Now want to implement similar parser in Java. I came across Antlr4 lib and want to use ...
Abhijit Parate's user avatar
0 votes
1 answer
446 views

I'm a newly to javacc. I tried to parse an existing javacc grammar (its the JSR341, EL 3.0 Grammar). It generates (almost) correct java. However, the generated code contains an illegal switch ...
Sjaak's user avatar
  • 4,318
1 vote
2 answers
2k views

I am using CUP to generate a parser, and I want an empty file to be an acceptable program. I have tried add the empty case to my start symbol, based off the response to a similar question here. start ...
adhdj's user avatar
  • 362
0 votes
1 answer
293 views

I have the following yacc/bison/happy grammar: %token if TokenIf then TokenThen else TokenElse true TokenTrue false TokenFalse %...
Sebastian Graf's user avatar
3 votes
1 answer
504 views

A parser is a something that takes an input string and spits out an AST. A parser generator is something that takes a grammar and spits out a parser. A static parser generator is something that ...
Vatsal's user avatar
  • 18.3k
1 vote
1 answer
1k views

I have to do Lexing and Parsing using PLY. I have gone through http://www.dabeaz.com/ply/ply.html this documentation to learn about PLY and looked at the calculator example. I'm new to all this. So, ...
zubug55's user avatar
  • 729
1 vote
3 answers
1k views

I am new to ANTLR and working on a parser to parse SAS code which mainly comprises of if then else if statements. I have created the following grammar to parse the code but I am getting error in ...
Ajay Sant's user avatar
  • 725
1 vote
2 answers
621 views

I'm working with Javacc to build a parser for a Pascal subset. This is my code: PARSER_BEGIN(Pascal) import java.io.*; public class Pascal { public static void main(String args[]) throws ...
Jorge Nachtigall's user avatar
0 votes
1 answer
2k views

I am trying to research on the possible parsers, as part of developing a PC application that can be used for parsing a Lin Descriptor File. The current parser application is based on flex-bison ...
gst's user avatar
  • 1,305
1 vote
0 answers
303 views

For a personal project to get me ready for an internship, I have decided to try and learn more about grammars and parsers. I wanted to make a simple compiler, and settled on a grammar that looks like ...
Johnny's user avatar
  • 33
2 votes
1 answer
842 views

ANLTR 4: I need to support a single quoted string literal with escaped characters AND the ability to use double curly braces as an 'escape sequence' that will need additional parsing. So both of ...
ichrisnichols's user avatar
2 votes
1 answer
487 views

I've got the following (heavily stripped down) Happy grammar %token '{' { Langle } '}' { Rangle } '..' { DotDot } '::' { ColonColon } '@' { At } mut { Mut } ident { ...
Alec's user avatar
  • 32.5k
6 votes
1 answer
822 views

I'm trying to learn basics of the Lemon parser generator, but I stuck quickly. Here's a tiny grammar: %right PLUS_PLUS. %left DOT. program ::= expr. member_expr ::= expr DOT IDENTIFIER. lhs_expr :...
Dmitry Frank's user avatar
  • 10.8k
2 votes
1 answer
1k views

I looked a little over the available parsers on the net but don't really understand what is the most suitable for my custom expression. (Antlr seems a little to heavyweight for my needs, but it's ...
hhh3112's user avatar
  • 2,207
3 votes
1 answer
604 views

I am trying to write a disassembler for Mindstorms EV3 VM binaries, preferably in Python, since I am very familiar with it. I have docs detailing the instructions set, opcodes, parameters, data types ...
Azsgy's user avatar
  • 3,305
0 votes
0 answers
119 views

Out of curiosity, having been studying a few parser generator libraries (Flex, Bison, ANTLR, some LLVM related stuff), would it be possible to write a new parser generator for a pre-existing scripting ...
oldjohn1994's user avatar
1 vote
1 answer
276 views

We have our scripting language that is already in use and we are improving it by adding new features etc. My question is; What is the best way to test our grammer (not end app) for backwards ...
Yusuf R. Karagöz's user avatar
0 votes
0 answers
187 views

I have some samples data extracted from a PDF and I need to write a parser to extract the text and numbers in an array for further manipulation. I think I should use JFlex but have no idea how to ...
Pascal DeMilly's user avatar
2 votes
1 answer
180 views

see the title. For a small tool I am writing I wanted to introduce a simple boolean filter language and decided to do that "properly" and use a parser-generator. After playing around with grako a bit ...
mageta's user avatar
  • 687
1 vote
1 answer
193 views

I'm trying to create a very simple DSL that takes a string formatted like GET /endpoint controller.action1 |> controller.action2 And turn it to something along the lines of {"GET", "/endpoint", ...
Tombert's user avatar
  • 530
-6 votes
1 answer
222 views

I have a project where I will create a truth table, and the user will input propositions and its operator and my program will output the truth values providing with a truth table. I have following ...
Spencer's user avatar
6 votes
1 answer
2k views

How to create a parser in erlang that will take in a properly formed propositional formula and converts it into some internal representation. Listing the available tools for creating a parser in ...
Chihab Adam's user avatar
4 votes
1 answer
992 views

I'm trying to learn how to use JavaCC to write a parser. I have already generated a lexer using JFlex, and that returns a list of tokens. Each token is it's own class. I'm writing the production ...
user2397282's user avatar
  • 3,808

1
2 3 4 5
7