grammar Questions

4

Solved

I am trying to avoid matching whitespace at the end of a string while still matching whitespace in the middle of words. Here is an example of a regex that matches underscores within x but does not ...
Pandit asked 22/11, 2020 at 17:25

3

Solved

The following Raku script: #!/usr/bin/env raku use v6.d; grammar MyGrammar { rule TOP { <keyword> '=' <value> } token keyword { \w+ } token value { <strvalue> | <numvalue&...
Cluster asked 15/8, 2020 at 13:4

3

Solved

In J. Barkley Rosser's "Logic for Mathematicians" he uses a notation to avoid too many parentheses. Although I don't know when logicians start using this notation, but I know that book first publis...
Pettifogging asked 29/8, 2013 at 12:7

3

Solved

NLTK (Natural Language Toolkit) lets you parse a FCFG grammar using nltk.FCFG.fromstring([grammar string here]). Where is the FCFG grammar format specification*? I googled it to death, but all I co...
Scrubber asked 12/3, 2016 at 21:10

1

Solved

I'm trying to figure out how I can rewrite NQP's Precedence Parser in Raku : The Precedence Parser is implemented here: https://github.com/Raku/nqp/blob/master/src/HLL/Grammar.nqp#L384 NQP should b...
Colorist asked 19/7, 2020 at 15:26

3

Solved

I need to match the values of key = value pairs in BibTeX files, which can contain arbitrarily nested braces, delimited by braces. I've got as far as matching at most two deep nested curly braces, ...
Brandiebrandise asked 17/7, 2020 at 3:9

1

Solved

I wrote a grammar like this: grammar StatementFormat { token TOP { (<plain> | '%' <placeholder>)* } token plain { <-[%]> } token placeholder { | <verb> | <noun>...
Haemophiliac asked 15/7, 2020 at 11:56

1

Solved

I'd like to capture the interior of a nested structure. my $str = "(a)"; say $str ~~ /"(" ~ ")" (\w) /; say $str ~~ /"(" ~ ")" <(\w)> /; say ...
Jari asked 4/7, 2020 at 11:59

3

Solved

I have some code that looks like self = @ and then later on it's using @someMethodName or self.someMethodName Does @ have some special meaning?
Osmunda asked 3/1, 2013 at 16:37

3

Solved

I'm trying to do a match in a raku grammar and failing with 'after'. I've boiled down my problem to the following snippet: grammar MyGrammar { token TOP { <character> } token character ...
Fructiferous asked 1/7, 2020 at 22:10

5

Solved

I have a class named Identity. In my javadoc comments I am referencing it as a plural. I can think of two solutions: change the reference to <code>Identities</code> or <code>Ident...
Footnote asked 28/12, 2016 at 22:24

3

Solved

I was drawn to Raku due to its built-in grammars and figured I'd play around with it and write a simple email address parser, only problem: I couldn't get it to work. I tried countless iterations ...
Pierpont asked 27/5, 2020 at 19:53

2

Solved

I have a probably easy to answer Raku grammar question. I wont to parse a log file and get back the entries log entry by log entry. A log entry can be just a line or a multi line string. My draft ...
Induce asked 22/5, 2020 at 12:9

4

Solved

I'm writing a Lisp to C translator and I have a problem with handling strings. This is a code that transforms an unary Lisp function to a C equivalent: define(F) --> fun_unary(F), !. fun_unary...
Shennashensi asked 16/1, 2011 at 21:38

2

Solved

Does anyone knows if there are some tutorials and/or examples of using GNU Bison with Java over the net. I've searched through the net. But i didn't manage to find anything. I have tried to impleme...
Provincetown asked 13/2, 2012 at 21:43

3

This is an NLP problem and I was wondering how I should proceed. How difficult is the problem? Could I replace the word with synonyms and check that the grammar is correct?

1

Solved

The lark parser predefines some common terminals, including a string. It is defined as follows: _STRING_INNER: /.*?/ _STRING_ESC_INNER: _STRING_INNER /(?<!\\)(\\\\)*?/ ESCAPED_STRING : "\"" _...
Waterer asked 22/4, 2020 at 18:11

1

Solved

Textmate grammar (.tmLanguage files) are sometimes expressed in XML format. I would like to convert to a more readable format (i.e. JSON or YAML) to integrate in a VS Code Syntax Highlighting Exte...
Incline asked 18/4, 2020 at 1:43

3

Solved

I would like to know the name of the syntax used for the Cloud Firestore security rules as described at https://firebase.google.com/docs/firestore/security/get-started?authuser=0. I would like to f...
Burdensome asked 6/10, 2017 at 7:28

1

Solved

In the documentation of Grammars under Section : "Always succeed" assertion I reproduced the example presented there, with added code to show the table produced, in each stage of the parsing...
Claudineclaudio asked 4/3, 2020 at 16:18

3

Solved

I have some TSV data ID Name Email 1 test [email protected] 321 stan [email protected] I would like to parse this into a list of hashes @entities[0]<Name> eq "test"; @entities...
Shaeshaef asked 3/3, 2020 at 15:35

6

I am new to ANTLR framework. I have been working around this for a week. Now am in a situation where i need to parse the Java file and extract the data. Am using ANTLR 4 for parsing. I create the L...
Hawse asked 30/9, 2014 at 9:5

1

When declaring a proto, it's possible to surround the multimethod/sub code with additional code. For a silly example: proto sub foo(|) { 'Camelia says “' ~ {*} ~ '!”' } multi sub foo(1) { "hi" } m...
Kashmiri asked 30/7, 2019 at 21:44

4

I've got a small problem with left recursion in this grammar. I'm trying to write it in Prolog, but I don't know how to remove left recursion. <expression> -> <simple_expression> &l...
Postbellum asked 19/5, 2012 at 8:29

4

Solved

Is there a good resource online with a collection of grammars for some of the major parsing algorithms (LL(1), LR(1), LR(0), LALR(1))? I've found many individual grammars that fall into these famil...
Wye asked 25/6, 2011 at 21:26

© 2022 - 2024 — McMap. All rights reserved.