antlr3 Questions

3

Solved

I have an ANTLR3 AST which I need to traverse using a post-order, depth-first traversal which I have implemented as roughly the following Clojure: (defn walk-tree [^CommonTree node] (if (zero? (....
Pamplona asked 11/9, 2012 at 14:26

2

Solved

I'm using ANTLR for creating a new general purpose programming language and I'm quite happy with it. Due to the fact that I would like to provide good tools for ease the development of programs wr...
Template asked 12/4, 2011 at 8:55

1

I'm trying to parse JavaScript (ECMASCript) with C#. I found the following instruction on how to create new project: http://www.antlr.org/wiki/pages/viewpage.action?pageId=557075 So I've downloaded...
Microstructure asked 8/2, 2012 at 17:6

3

Solved

I'm writing a program where I need to parse a JavaScript source file, extract some facts, and insert/replace portions of the code. A simplified description of the sorts of things I'd need to do is,...
Hardenberg asked 23/7, 2012 at 7:28

1

Solved

I know what the caret postfix means in antlr(ie. make root) but what about when the caret is the prefix as in the following grammar I have been reading(this grammar is brand new and done by a new t...
Luedtke asked 6/7, 2012 at 16:2

1

Solved

Which one would you prefer to declare a variable in which case, global scope or @members declaration? It seems to me that they can serve for same purpose? UPDATE here is a grammar to explain what ...
Zante asked 16/5, 2012 at 7:19

1

Solved

I'm using ANTLR to tokenize a simple grammar, and need to differentiate between an ID: ID : LETTER (LETTER | DIGIT)* ; fragment DIGIT : '0'..'9' ; fragment LETTER : 'a'..'z' | 'A'..'Z' ; and a ...
Competency asked 15/3, 2012 at 19:18

2

Solved

I was trying hard to make ANTLR 3.2 generate parser/lexer in C++. It was fruitless. Things went well with Java & C though. I was using this tutorial to get started: http://www.ibm.com/develope...
Eucalyptol asked 2/12, 2009 at 8:46

1

Solved

I'm using the antlr-3.4-complete-no-antlrv2.jar version of ANTLR on Eclipse Indigo. I have installed the ANTLR IDE plugin along with ZEST and GEF. When I generate a combined grammar file and add ...
Assemblyman asked 12/1, 2012 at 1:18

1

Solved

How can the negation meta-character, ~, be used in ANTLR's lexer- and parser rules?
Subchloride asked 27/11, 2011 at 10:30

1

Solved

I have this simple grammer: expr: factor; factor: atom (('*' ^ | '/'^) atom)*; atom: INT | ':' expr; INT: ('0'..'9')+ when I run it it says : Decision can match input such as '*' using mult...
Ib asked 31/10, 2011 at 13:6

1

Solved

I've been working on a parser for some template language embeded in HTML (FreeMarker), piece of example here: ${abc} <html> <head> <title>Welcome!</title> </head>...
Homestretch asked 22/10, 2011 at 17:53

3

I have a built C static library (the Antlr 3 C library). It is installed properly and works (i.e., I can run gcc -o parser lexer.c parser.c -lantlr3c just fine). In Xcode, however, I get an error...
Daugavpils asked 30/9, 2011 at 4:0

1

Solved

I am an ANTLR beginner and want to calculate a SHA1-Hash of symbols. My simplified example grammar: grammar Example; method @after{calculateSha1($text); }: 'call' ID; ID: 'A'..'Z'+; WS: (' '|'\...
Zerline asked 16/9, 2011 at 11:14

1

Solved

I am currently creating a more or less simple expression evaluator using ANTLR. My grammar is straightforward (at least i hope so) and looks like this: grammar SXLGrammar; options { language = ...
Ichthyornis asked 13/7, 2011 at 11:39

1

Solved

I have a grammar that I'd like to include multi-parameter functions in (like f(x,y)). I'm using AST output with my own tree parser. Right now my parameter list production is paramdefs: (ID COMMA)*...
Pasteurism asked 11/7, 2011 at 0:57

1

Solved

I have a language which basically is meant to map columns to a new structure in an array. The language is meant for product managers to define mappings without having to know a lot of programming d...
Idalia asked 6/7, 2011 at 15:28

1

Solved

I'm receiving a warning when antlr v3.1 compiles on this rule sentence : (CAPITAL_LETTERS_AND_NUMBERS | INT | ANY_WORD ) ( INT | CAPITAL_LETTERS_AND_NUMBERS | ANY_WORD )*; The warning is: ...
Stowaway asked 27/6, 2011 at 21:53

1

Solved

I'm building a parser in antlr which compiles to a working java target. When I retarget for c#2 it produces a parser in which all of the parse methods are private but marked with a [GrammarRule("ru...
Bloater asked 20/6, 2011 at 12:59

3

Solved

This is the lexer in Antlr (sorry for a long file): lexer grammar SqlServerDialectLexer; /* T-SQL words */ AND: 'AND'; BIGINT: 'BIGINT'; BIT: 'BIT'; CASE: 'CASE'; CHAR: 'CHAR'; COUNT: 'COUNT'; CRE...
Cadence asked 8/6, 2011 at 19:16

1

Solved

I have a situation where my language contains some words that aren't known at build time but will be known at run time causing the need to constantly rebuild / redeploy the program to take into acc...
Portion asked 24/5, 2011 at 9:20

1

Solved

I'm having trouble figuring out the antlr3 API so I can generate and use a parse tree in some javascript code. When I open the grammar file using antlrWorks (their IDE), the interpreter is able to ...
Alpert asked 12/5, 2011 at 16:24

2

Solved

I want to parse ISO 8601 dates in my ANTLR grammar. 2001-05-03 I have the following entries in my grammar file: date : FOUR_DIGIT ('-')? TWO_DIGIT ('-')? TWO_DIGIT ; FOUR_DIGIT : TWO_DIGIT TW...
Mirador asked 3/5, 2011 at 5:31

1

My question is in regards to running the following grammar in ANTLRWorks: INT :('0'..'9')+; SEMICOLON: ';'; NEWLINE: ('\r\n'|'\n'|'\r'); STMTEND: (SEMICOLON (NEWLINE)*|NEWLINE+); statement : STM...
Attar asked 17/4, 2011 at 20:56

3

Solved

I'm currently developing a general-purpose agent-based programming language (its syntaxt will be somewhat inspired by Java, and we are also using object in this language). Since the beginning of t...
Sulfonmethane asked 12/4, 2011 at 8:16

© 2022 - 2024 — McMap. All rights reserved.