Questions tagged [irony]

For Irony, the development kit for implementing languages on .NET platform.

Unlike most existing YACC/Lex-style solutions, Irony does not employ any scanner or parser code generation from grammar specifications written in a specialized meta-language. In Irony the target language grammar is coded directly in C# using operator overloading to express grammar constructs.

Irony's scanner and parser modules use the grammar encoded as a C# class to control the parsing process. See the expression grammar sample for an example of grammar definition in C# class, and using it in a working parser.

The Irony Github project: https://github.com/IronyProject/Irony

66 questions
0
votes
1 answer

irony: how come some things generate AST and some dont

SQL sample just generates token tree But most samples on how to use irony all go 'parse' then 'traverse generated ast'
pm100
  • 48,078
  • 23
  • 82
  • 145
0
votes
1 answer

Using Irony for custom language design in .Net 2.0

Just as the question says, I'm stuck with .Net 2.0 here in my company and there is no chance of upgrading. Is there a way to make Irony work in .NET 2.0. I'll briefly try to explain what I'm trying to achieve. We at our company have a payroll system…
Soham Dasgupta
  • 5,061
  • 24
  • 79
  • 125
0
votes
2 answers

Analysing C# source with Irony

This is what my team and I chose to do for our school project. Well, actually we haven't decided on how to parse the C# source files yet. What we are aiming to achieve is, perform a full analysis on a C# source file, and produce up a report. In…
user917615
0
votes
1 answer

How to resolve reduce-reduce conflict in Irony?

I'm writing an extended mathematical expression evaluator. It is supposed to allow defining macros in the form: f(x):=2*x I'm using Irony to break the expression into the parse tree. Grammar looks like following: using Irony.Parsing; using…
Spook
  • 25,318
  • 18
  • 90
  • 167
0
votes
1 answer

Irony BnfExpression that produces different non terminals that can be in any order

I'm trying to create a grammar that allows productions to come in any order. For example: Name Type Value and Value Name Type Should both be…
Javier
  • 55
  • 9
0
votes
0 answers

SQL Server 2008 R2 Full Text Search for a Shop

This is a longer one, so please bear with me :-) I'm in the situation to advance the search for our intranet shop. The current solution is working OKish, but there are some drawbacks the way it is implemented. We are using ASP.NET and SQL Server…
0
votes
1 answer

How to ignore special characters, as it was whitespace, on Irony parser

I am implementing a parser at Irony parser and I want to skip some special characters as <,>,(,), etc. I want the parser to treat them as the space character. How can I add some characters at the ignore list?
Menelaos Vergis
  • 3,715
  • 5
  • 30
  • 46
0
votes
1 answer

Go throught the AST tree and get the childnode value Irony

I want to go through the AST tree and get the ChildNode equals "IfStatement" but there could be a lot of Childnodes like in code below. Is there some method to do it in recursive way to add childNodes and check the value ? MyGrammar grammar = new…
Paweld_00
  • 81
  • 8
0
votes
1 answer

Irony Reduce-Reduce Problems

I have been trying to figure out this same issue for almost 2 weeks now. At first it was shift-reduce errors now its reduce-reduce problems. I have tried doing it so many ways and now I have came to the point where I just need help. I've coded many…
0
votes
0 answers

Irony Shift Reduce Problems

I have been trying to figure out how to fix some shift reduce conflicts I have. I have looked around and found different topics on fixing it but it seems like no matter what I do I just can't seem to find a way to fix these issues. I am trying to…
0
votes
1 answer

How to define escape sequence and character literal using Irony?

I'm implementing a grammar that has some rules like this: char-literal ::= ' regular-char ' ∣ ' escape-sequence ' escape-sequence ::= \ ( \ ∣ " ∣ ' ∣ n ∣ t ∣ b ∣ r ∣ space ) ∣ \ (0…9) (0…9) (0…9) ∣ \x (0…9∣…
tett
  • 595
  • 3
  • 13
  • 34
0
votes
1 answer

How to Generate and display ParseTree for an expression in C# using Irony?

I want to generate and display context free grammar using irony and so far I am able to write the context free grammar by following code public ExpressionGrammar() { //// 1. Terminals Terminal…
0
votes
1 answer

Simple FormatString language using Irony

I'm trying to define a simplistic language using Irony. Some language usecases are Dear {Name}, It is free text with therein references to fields enclosed in curly braces. a double curly brace escapes a field declaration. I came up with the…
Ruudjah
  • 807
  • 7
  • 27
0
votes
1 answer

C99 grammar in Irony - declaration/statement conflicts

I'm trying to use Irony to parse C99, and I found a grammar online to guide me. I'm having difficulty with conflicts on declaration versus statement. The following rule fails to detect a pointer declaration with initializer. blockItemList.Rule =…
xtravar
  • 1,321
  • 11
  • 24
0
votes
1 answer

Getting parent node in Irony parser

I am using Irony parser for NET in order to get a simple structure for an algebraic-like syntax: 2 + 3 * 5 7 + (2 * 5) a.s.o. The parsing works fine and I am using ParseTreeNode in order to get a reference for each node in my input. How can I get…
Tamas Ionut
  • 4,240
  • 5
  • 36
  • 59