peg Questions

1

I'm searching for some widely extended dialect (like this one https://github.com/vmeurisse/wildmatch + globstar **) described with BFN rules. In any format or language. OMeta or PEG would be great...
Reliance asked 7/9, 2014 at 14:51

2

Solved

I was enjoying using YARD a lot: http://www.ootl.org/yard/ http://code.google.com/p/yardparser/ http://www.codeproject.com/KB/recipes/yard-tokenizer.aspx I was able to construct fully fun...
Cythiacyto asked 6/12, 2009 at 23:32

2

Solved

I've defined the following minimal Peg.js grammar: start = "A1" / "A123" which you can try in the sandbox. I would have expected to match "A1" as well as "A123" (according to my notion of how ...
Rankle asked 16/7, 2014 at 6:15

1

I want to parse a file with lines of the following content: simple word abbr -8. (012) word, simple phrase, one another phrase - (simply dummy text of the printing; Lorem Ipsum : "Lorem" - has bee...
Isomer asked 9/7, 2014 at 17:2

1

Solved

The following pattern (from this page) matches only strings with balanced parentheses: b = lpeg.P{ "(" * ((1 - lpeg.S"()") + lpeg.V(1))^0 * ")" } What does 1- in 1 - lpeg.S"()" mean? function g...
Cuneo asked 18/10, 2013 at 21:44

1

Solved

I'm using the Python Parsimonious Parser to try to build an interpreter for a simple language I'm designing. I watched this tutorial video which was very helpful, and now I'm slowly modifying the c...
Bes asked 23/9, 2013 at 19:0

2

Solved

PEG-based parser generators usually provide limited error reporting on invalid inputs. From what I read, the parse dialect of rebol is inspired by PEG grammars extended with regular expressions. F...
Saltine asked 4/7, 2013 at 19:36

1

Solved

I'm trying to match this f(some_thing) == 'something else' f(some_thing) is a function call, which is an expression == is a boolean operator 'something else' is a string, which also is an expr...
Coachwhip asked 19/3, 2013 at 17:10

1

Solved

Is there a tool that translates a PEG.js grammar to a TextMate grammar? I am building my own language and would like to have syntax highlighting for it in my preferred editor, TextMate. The gramma...
Zumwalt asked 2/2, 2013 at 18:39

3

Solved

I'm implementing a PEG parser generator in Python, and I've had success so far, except with the "cut" feature, of which whomever knows Prolog must know about. The idea is that after a cut (!) symb...
Drayton asked 3/1, 2013 at 18:15

1

Solved

I am trying to write a simple grammer for PEG.js that would match something like this: some text; arbitrary other text that can also have µnicode; different expression; let's escape the \; semicol...
Zootoxin asked 5/10, 2012 at 9:58

1

Solved

I'm trying to make a parser using pegjs. I need to parse something like: blah blah START Lorem ipsum dolor sit amet, consectetur adipiscing elit END foo bar etc. I have trouble writing the ru...
Louislouisa asked 1/9, 2012 at 19:26

3

Solved

I have a bbcode -> html converter that responds to the change event in a textarea. Currently, this is done using a series of regular expressions, and there are a number of pathological cases. I've ...
Fingerstall asked 29/6, 2012 at 20:13

2

Solved

I have some experience writing parsers with ANTLR and I am trying (for self-education :) ) to port one of them to PEG (Parsing Expression Grammar). As I am trying to get a feel for the idea, one t...
Emilyemina asked 9/4, 2012 at 11:21

1

Solved

Part of a Lua application of mine is a search bar, and I'm trying to make it understand boolean expressions. I'm using LPeg, but the current grammar gives a strange result: > re, yajl = require...
Shoddy asked 13/1, 2012 at 1:38

1

Solved

I want to ignore whitespaces and new lines with my grammar so they are missing in the PEG.js output. Also, a literal within brackets should be returned in a new array. Grammar start = 'a'? sep+ ...
Shayne asked 24/11, 2011 at 12:37

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

2

Solved

I'm masochistically writing an open-source text editor for Mac and have finally reached the point at which I want to add syntax highlighting. I've been going back and forth on various solutio...
Vulcanology asked 13/11, 2010 at 0:24

3

How would I do something like this in Treetop? /.+?;/ It seems like the only way is to do: [^;]+ ';' Which is kind of ugly.. any other way? .+? doesn't seem to work..
Deity asked 25/6, 2009 at 20:1

10

Solved

I have a body of text that I have to scan and each line contains at least 2 and sometimes four parts of information. The problem is that each line can be 1 out of 15-20 different actions. in ruby ...
Betoken asked 19/11, 2008 at 23:44

© 2022 - 2024 — McMap. All rights reserved.