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
1
vote
0 answers

can i do full text search including special characters?

I am using irony for full text search in c# application which works fine. Now my need is that i want to search a text including some special characters such as [, ], ;, ~, ', \, /, <, >, ,. When i do search with above special characters it shows…
1
vote
0 answers

Irony Language Toolkit - FreeTextLiteral usage

We have some special requirements around text templating that cannot be solved via any of the common packages (T4, NVelocity, StringTemplate..). So we have decided to attempt our own, using Irony. Given the simple form where anything inside <%%>…
6footunder
  • 1,318
  • 18
  • 29
1
vote
1 answer

Irony parse null value in c#

I am looking for a way to parse a string (key-value pair) that has null value. I am using Irony nuget in c#. Example string 1: key = "value" Example string 2: key = null I am able to parse Example string 1 using the below way: var stringLiteral =…
Deepak
  • 2,660
  • 2
  • 8
  • 23
1
vote
1 answer

Irony Parsing a list delimited with white space

I am trying to write a parser for Allen Bradly SLC Language/File format. I have successfully got it to parse a register reference. I.E. N5:4/3. However, when I try to move to to the next level, having it parse a list of register references separated…
TheColonel26
  • 2,618
  • 7
  • 25
  • 50
1
vote
1 answer

Irony - SampleExpressionEvaluator 1.0 - Where is the "iff" symbol defined?

I am using the Grammar Explorer provided in the Irony repo. I am trying to understand how things work. I am confused. I can't seem to find where the iff symbol is defined in the SampleExpressionEvaluator 1.0 Sample - "testlif.txt" iif(1 > 0, "true",…
TheColonel26
  • 2,618
  • 7
  • 25
  • 50
1
vote
0 answers

Custom data types in Irony language

I'm trying to build a language using Irony. The problem I'm facing is that I want my language to have some built-in data types (not just strings and mubers, but also some custom objects with properties etc.) In ExpressionEvaluator I see how built-in…
dace
  • 124
  • 2
  • 12
1
vote
0 answers

Using Irony with C# to convert a search string into SQL Full text index query

I have a search box where users can enter text, when they hit search the text they entered will then be used in a SQL CONTAINSTABLE statement. I need to parse the string so that it is in an appropriate format for the CONTAINSTABLE function, and I…
Matt F
  • 129
  • 1
  • 8
1
vote
1 answer

Get delimiter in Irony

I have the following rule in the grammar: NonTerminal linker = new NonTerminal("linker"); NonTerminal list = new NonTerminal("list "); NonTerminal item = new NonTerminal("item"); KeyTerm AND = ToTerm("AND"); KeyTerm OR = ToTerm("OR"); list.Rule =…
Tamas Ionut
  • 4,240
  • 5
  • 36
  • 59
1
vote
1 answer

How to parse information from text file

I am looking into various options to parse data from text files. We receive invoices from different clients and the format is not predefined. Basically we receive table kind of structure with different columns as shown below and data needs to be…
Sunny
  • 4,765
  • 5
  • 37
  • 72
1
vote
2 answers

What's Irony's equivalent of Yacc's optional operator ("?")?

I have a fragment of grammar in Yacc notation: stylesheet : [ CHARSET_SYM STRING ';' ]? [S|CDO|CDC]* [ import [ CDO S* | CDC S* ]* ]* [ [ ruleset | media | page ] [ CDO S* | CDC S* ]* ]* ; How do I implement this fragment in Irony? I can't find…
1
vote
1 answer

Irony rebuild statement

I am working with Irony.Net (https://irony.codeplex.com/) and have been working with the SQL Grammar. Now I have the parser and items working to get my statements correctly parsed. ( I had to add parameter support to the default grammar). Now my…
Nico
  • 12,493
  • 5
  • 42
  • 62
1
vote
1 answer

How to deal with indentation-sensitive language with Irony?

I am trying to parse a very naive indentation-sensitive language with only two constructs (hello the statement, and fun a block definition). hello hello fun hello hello hello In order to do that, I have composed the following grammar with…
Joannes Vermorel
  • 8,976
  • 12
  • 64
  • 104
1
vote
0 answers

What is Irony telling me about this Shift/Reduce error?

I am writing a parser for the PowerShell language, using the grammar described here: http://www.microsoft.com/en-us/download/details.aspx?id=9706. I used Irony, and the Irony Grammar Explorer is reporting some shift/reduce and reduce/reduce errors.…
Jay Bazuzi
  • 45,157
  • 15
  • 111
  • 168
1
vote
0 answers

Simple grammar in Irony doesn't work as expected

I've been trying to use Irony to parse some XML code. I defined the grammar as follows: this.Root = tagList; tagList.Rule = this.MakeStarRule(tagList, tag); tag.Rule = conditionBlock; ifTagOpen.Rule = < + "a" + "condition" + equals + "'i'" +…
1
vote
1 answer

C# Irony Parser - Won't parse file despite everything seems correct

I am having some tricky problems with Irony which I do not understand... The first parsing I do in the runtime of my application succeeds. string src = "" // this is the file to parse Grammar g = new CSharpGrammar(); LanguageData language = new…
Markus Köhler
  • 764
  • 2
  • 8
  • 20