# Yacc/Lex Tools v0.2

In my previous post "[Languages and Translators with Visual Studio](https://devnotes.ernstc.net/languages-and-translators-with-visual-studio)" I explained how to add a parser to your C# project using the tools **GPPG **and **GPLEX **to compile the files YACC and LEX to generate respectively the parser and its scanner.

In the previous post I have illustrated how to modify the project file by hand after installing the NuGet package **YaccLexTools**.

The package "**YaccLexTools**" has been updated and from version 0.2 i**s no longer necessary to manually edit the XML tags of the project file**. With this new version you can manage everything thanks to new PowerShell Cmd-Let from the "Package Manager Console" in Visual Studio.

For example, to add a parser to your project you will just need to run the command:
```powershell
PM> Add-Parser MyLanguage 
```
This command will create all files and settings required to compile YACC and LEX files.

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1651523920508/pdmZ1m6Xi.png align="left")

If you want to specify a custom namespace you can run the following command whose second parameter is the namespace:
```powershell
PM> Add-Parser MyLanguage Sample.NameSpace
```
To remove the settings for a parser created in the project you can use the following command:
```powershell
PM> Remove-Parser MyLanguage
```
This command will not remove files, but only the settings for the specified parser. The files must be removed manually.

Finally, included in the package is a working example to interpret calculus expressions. To add it to the project, just use the command
```powershell
 PM> Add-CalculatorExample 
```

## Conclusions
In this post were shown the simplifications implemented in the new version of the NuGet package [YaccLexTools](https://www.nuget.org/packages/YaccLexTools) for the management of parsers within C# projects.

With the hope that these updates are useful to those who already use the package and all of those who will use it,

*ernstc*

## References
* GPPG original repository: https://github.com/k-john-gough/gppg
* GPLEX original repository: https://github.com/k-john-gough/gplex
* Yacc/Lex Tools nuget package: https://www.nuget.org/packages/YaccLexTools
* Yacc/Lex Tools project repository: https://github.com/ernstc/YaccLexTools

---
This post has been republished from my previous blog (https://ecianciotta-en.blogspot.com/2013/08/yacclex-tools-v02.html).
