Code Monkey home page Code Monkey logo

anon-validator-language-eng-challenge's Introduction

AnonValidator

Problem Statement :

ANON (Another Notorious Object Notation) is a madeup configuration format very similar to JSON. We need to build a validator that validates whether a given ANON String is syntactically correct or not.

How to Test :

  1. Host this web application and open the index.php file to test the ANON Parser

Directory Contents :

  1. parser : Contains the Parser Business Logic
  2. images : Contains sample images
  3. testcases : Contains multiple test cases i.e. Sample ANON String files
  4. index.php : Frontend for the Parser Application

Approach :

I have built an ANON Parser that parses a given ANON String if it is syntactically correct. If the ANON String is invalid then it notifies you about the same. I have implemented a recursive approach to build the validator. It starts from the root and goes to the depth in case of multiple nested ANON Objects present. The parser converts the ANON String into a recursive tree and then validates each and every ANON Object present at its node. When the validation succeeds then it gives out the processed ANON Object as the response. If the parser fails at any point then it return the following error message "Invalid ANON Object".

The process of conversion of a valid ANON string to the recursive tree looks like this :

Parse Tree

Sample Outputs :

Parse Sample 1 Parse Sample 2 Parse Sample 3

Sample Video

Parse Sample Video

anon-validator-language-eng-challenge's People

Contributors

sauravp97 avatar

Watchers

 avatar

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.