Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 746 Bytes

README.md

File metadata and controls

36 lines (27 loc) · 746 Bytes

json-parser

A simple JSON parser application to demonstrate the Lexical and Syntax analysis stages of compilers

If you have Go installed and set up:

Run:

go install

Usage:

json-parser <filename> [flags]

For a list of available flags and examples, run:

json-parser --help

If you don't have Go installed:

Usage:

json-parser.exe <filename> [flags]

For a list of available options, run:

json-parser.exe --help

NOTE:

  • The output 'token' type from the lexer (when the -l flag is passed) consists of two fields - the token value(the actual token) and its position in the JSON string.
  • Two test JSON files exist in the directory. You can add any JSON file as you see fit.