LexicalAnalyzer 1.0.1

dotnet add package LexicalAnalyzer --version 1.0.1
NuGet\Install-Package LexicalAnalyzer -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LexicalAnalyzer" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LexicalAnalyzer --version 1.0.1
#r "nuget: LexicalAnalyzer, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LexicalAnalyzer as a Cake Addin
#addin nuget:?package=LexicalAnalyzer&version=1.0.1

// Install LexicalAnalyzer as a Cake Tool
#tool nuget:?package=LexicalAnalyzer&version=1.0.1

LexicalAnalyzer Analisador Léxico para uma linguagem hipotética. A partir de uma entrada, onde contem uma cadeia de caracteres, é gerado uma lista de lexemas+tokens. Exemplo: "var resultado = (34 / (3 + 5)", gera os seguintes lexemas+tokens.

'var' → RESERVED_WORD_VAR 'resultado' → IDENTIFIER '=' → ASSIGNMENT '34' → NUMBER '/' → OPERATOR_DIVISION '(' → DELIMITER_OPEN_PARENTHESES '3' → NUMBER '+' → OPERATOR_SUM '5' → NUMBER ')' → DELIMITER_CLOSE_PARENTHESES Como usar Disponível em: Nuget Install into your PCL project and Client projects.

    static void Main(string[] args)
    {
        string codigo = "var teste = (34 / (3.5 + 5^2) ." +
                        "if (34 >= 5) { return; }";

        Lexer lexer = new Lexer();
        IEnumerable<TokenDefinition> tokenDefinition = TokenDefinition.GetTokens();

        foreach (var token in tokenDefinition)
        {
            lexer.AddDefinition(token);
        }

        var tokens = lexer.Tokenize(codigo).ToList();

        foreach (var item in tokens)
        {
            Console.WriteLine(item.ToString());
        }

        Console.Read();
    }

O Analisador Léxico foi feito baseado em definições regulares que analisam os padrões do código de entrada e Autômatos Finitos que aceitam as definições regulares.

Tecnologias implementadas: .NET Core 2.0

Sobre: Desenvolvido por Mauricio Moccelin sobre Licença GNU.

Product 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. 
.NET Core netcoreapp2.0 is compatible.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 1,083 5/12/2018
1.0.0 912 5/8/2018

Reconhece valores decimais e inteiros.