AnglrParserLibrary 1.0.6
dotnet add package AnglrParserLibrary --version 1.0.6
NuGet\Install-Package AnglrParserLibrary -Version 1.0.6
<PackageReference Include="AnglrParserLibrary" Version="1.0.6" />
<PackageVersion Include="AnglrParserLibrary" Version="1.0.6" />
<PackageReference Include="AnglrParserLibrary" />
paket add AnglrParserLibrary --version 1.0.6
#r "nuget: AnglrParserLibrary, 1.0.6"
#:package AnglrParserLibrary@1.0.6
#addin nuget:?package=AnglrParserLibrary&version=1.0.6
#tool nuget:?package=AnglrParserLibrary&version=1.0.6
Anglr VSIX extension
Short description
Anglr VSIX is the official Visual Studio extension for the Anglr language and toolchain. It integrates tightly with the Anglr compiler, MSBuild tasks, and project system to deliver a unified editing and build experience.
The extension provides:
Language awareness — content types, file associations, syntax classification
Editor tooling — semantic coloring, lightweight IntelliSense, classifier‑based structure hints
Build integration — automatic discovery of Anglr files, MSBuild item registration, and invocation of the Anglr compiler during project builds
Developer workflow enhancements — error surfacing, output routing, and optional integration with Visual Studio’s Output Window
Anglr VSIX is designed to be lightweight, dependency‑free, and safe for the Visual Studio environment, making it suitable for both standalone Anglr projects and mixed‑language solutions.
🧠 What Anglr Generates (Core Capabilities Overview)
Anglr is a compiler/parser generator for context‑free grammars. From a single .anglr grammar file, Anglr produces a complete, strongly‑typed parsing and analysis pipeline:
Incremental parsers Efficient parsers that update only the affected parts of the syntax tree when the source changes — ideal for IDE scenarios and real‑time tooling.
Typed parse‑tree objects Each syntactic rule produces a dedicated node type, giving you a structured, navigable representation of the grammar.
Semantic analysis infrastructure Anglr generates objects that support semantic processing through an event‑driven model. Each syntactic rule has an associated semantic event, triggered when the visitor processes the corresponding node.
Visitor pattern support Anglr emits a complete visitor API for traversing syntax trees, enabling transformations, validations, and code generation.
Source regeneration Any syntax tree produced by the parser can be converted back into source code, preserving formatting rules defined by the grammar.
This makes Anglr suitable not only for language design, but also for DSLs, code generators, configuration languages, and domain‑specific modeling tools.
📄 Example .anglr Grammar (Minimal but Illustrative)
Here’s an example that demonstrates how to declare tokens and regular expressions, scanner definitions, lexical analyzer definition and parser definition for a simple calculator that allows basic arithmetic operations: addition, subtraction, multiplication, and division:
[ Description Text='definitions of tokens and regular expressions used to define syntax']
[ Description Text='of simple arithmetic expressions']
[
CompilationInfo
ClassName='MathDecls'
NameSpace='Math.Declarations'
Access='public'
]
%declarations mathDecls
%{
%regex
{
decimal-digit [0-9]
number {decimal-digit}+
add \+
sub \-
mul \*
div \/
lb \(
rb \)
}
%terminal
{
NUMBER
add '+'
sub '-'
mul '*'
div '/'
lb '('
rb ')'
}
%}
[ Description Text='definition of scanner, which extracts comments from input string']
[ Declarations Id='mathDecls' ]
[
CompilationInfo
ClassName='CommentRegex'
NameSpace='Math.ScannerLib'
Access='public'
]
%scanner commentScanner
%{
[\*]+\/
pop
[\n\r]
skip
[^\*]+
skip
[\*]+
skip
%}
[ Description Text='definition of scanner, which extracts terminal symbols from input string']
[ Declarations Id='mathDecls' ]
[
CompilationInfo
ClassName='MathRegex'
NameSpace='Math.ScannerLib'
Access='public'
]
%scanner mathScanner
%{
\/\*
push commentScanner
{number}
terminal NUMBER
{add}
terminal add
{sub}
terminal sub
{mul}
terminal mul
{div}
terminal div
{lb}
terminal lb
{rb}
terminal rb
[ \t]+
skip
[\n\r]
skip
.
skip
%}
[ Description Text='Lexer for anglr file' Hover='true' ]
[
UseScanner
ScannerId='commentScanner'
InitialScanner='mathScanner'
Hover='true'
]
[
CompilationInfo
ClassName='MathLexer'
NameSpace='Math.Lexer'
Access='public'
Hover='true'
CodeDir='.'
]
%lexer mathLexer
%{
%}
[ Declarations Id='mathDecls' ]
[ Lexer Id='mathLexer' ]
[
CompilationInfo
ClassName='MathParser'
NameSpace='Math.Parser'
Access='public'
CodeDir='mathParser'
]
%parser mathParser
%{
[ Start ]
expression
: additive-expression
;
additive-expression
: multiplicative-expression
| additive-expression '+' multiplicative-expression
| additive-expression '-' multiplicative-expression
;
multiplicative-expression
: unary-expression
| multiplicative-expression '*' unary-expression
| multiplicative-expression '/' unary-expression
;
unary-expression
: number
| '(' expression ')'
;
number
: NUMBER
| '+' number
| '-' number
;
%}
The syntax rules are written in such a way that it takes into account the priority of arithmetic operators.
Based on this information, the Anglr compiler generates a set of source C# files, in which the lexical and syntactic analyzer for arithmetic expressions defined in the .anglr file are implemented. In addition to the files in which the lexical and syntax analyzers are implemented, there are also files that can be used to implement the semantic analysis of arithmetic expressions.
These files (C# classes contained within them) can also be used to create applications that calculate simple arithmetic expressions.
With the help of the Anglr compiler, it is also possible to generate lexical and syntactic analyzers for all modern programming languages, such as C#, Java, C++, etc. Working examples for C# and Java can be found on the official website for the Anglr compiler.
In .anglr files, only anglr source code is located. The source code that is used for semantic analysis (written in C#, Java, C++, ..) is written in separate files. Therefore, the syntactic analyzer defined in this way can be used for various purposes, which we implement by adding a new implementation of semantic rules. We can keep the previous one, allowing us to create applications that serve different purposes. Or we can use the same .anglr file to create different applications.
We can also write syntactic rules more compactly and complexly, e.g.:
expression
:
( : basic-operand :
NUMBER
| '(' expression ')'
| '+' basic-operand
| '-' basic-operand
)
+ [ '<<' | '>>' ]
+ [ '&' ]
+ [ '^' ]
+ [ '|' ]
+ [ '*' | '/' ]
+ [ '+' | '-' ]
~+ [ '=' | '+=' | '-=' | '*=' | '/=' | '|=' | '^=' | '&=' | '<<=' | '>>=' ]
+ [ '<' | '>' | '<=' | '>=' ]
+ [ '==' | '!=' ]
+ [ '&&' ]
+ [ '||' ]
+ [ ';' ]
;
This is a similar arithmetic expression as before, except that it defines many more arithmetic operations. The order of operations (essentially it is about nesting) determines their priority. In all modern programming languages, arithmetic operators have this precedence order. It does not look the most natural, but it is as it is.
Screenshots
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- AnglrDebugBridge (>= 1.0.6)
- AnglrLogLibrary (>= 1.0.6)
- AnglrParserCore (>= 1.0.6)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AnglrParserLibrary:
| Package | Downloads |
|---|---|
|
AnglrMSBuildTasks
Compiles AnGLR source file to set of C# files. See https://www.angstlr.com/ for details. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.6 | 131 | 5/11/2026 |