GithubHelp home page GithubHelp logo

axis.pulsar's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

axis.pulsar's Issues

Implement `Trace Writing`

Include an optional trace-writer for the recognizers so printing out the trace can be used as a debug tool.

Bug: RecognitionThreshold not defaulting to a disabled state

By default, when not specified, a NonTemrinal should always result in a FailedRecognitionError when its group element returns a FailedRecognitionError. This means for sequences, no matter how many elements were successfully recognized before the failure, the NonTerminal will never return a PartialRecognitionError.

Tests revealed that NonTerminal entities default to a recognition threshold of 1. This needs to be changed.

Implement `Grammar Importation`

The ability to import a grammar into another grammar, and use on-demand namespaces to demarcate grammars, is a nice to have feature.

Bug: `XBNF` atomic content argument.

Parsing atomic content arguments has a bug where escaping the ' character with \' yields the whole escape sequence - in other words, the code failed to strip the \.

Methods to add

Add these methods to the BufferedTokenReader:

    public bool TryNextTokens(string tokens, bool resetIfCompareFails = true) => TryNextTokens(resetIfCompareFails, tokens.ToArray());

    public bool TryNextTokens(bool resetIfCompareFails, params char[] tokensToReadAndCompare)
    {
        if (tokensToReadAndCompare == null || tokensToReadAndCompare.Length == 0)
            throw new ArgumentException("Invalid argument");

        else
        {
            var position = Position;
            if(TryNextTokens(tokensToReadAndCompare.Length, out var read))
            {
                if (tokensToReadAndCompare.SequenceEqual(read))
                    return true;

                if (resetIfCompareFails)
                    Reset(position);
            }

            return false;
        }
    }

Refactor `Recognition Threshold`

Recognition Threshold should consider ONLY non-optional ICSTNode instances - this invariably means that ICSTNode implementations will need an extra property to tell if they are optional or required.

This feature is necessary because setting a threshold yields inconsistent results when optional symbols are present in the production symbol list.

Bug: `XBNF` Delimited content bug

XBNF has a bug where delimited content appearing before a sequence (within another group) is not recognized correctly because
the the content concatenation operator clashes with the start-delimiter for sequences.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.