Skip to content

Tool to parse Nested Words in a given sequence using the Ragel State Machine Compiler, 2017.

License

Notifications You must be signed in to change notification settings

nirmalben/nested-word-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nested-word-parser

Tool to parse Nested Words in a given sequence. The Nested Word Automaton (NWA) used for parsing is built using the Ragel State Machine Compiler. The code demonstrates a way to build the NWA using the Ragel library.

Prerequisites

Usage

$ python3 ./nested_word_parser.py --help
$ python3 ./nested_word_parser.py -r <Nested Word Automaton regex> -f <Filename to parse> -i <Absolute location of the Python 3 executable>

Examples

  • By default, the values of the arguments are as follows:
    $ python3 ./nested_word_parser.py -r "<0.1.2>" -f "./data/t1.csv" -i "/usr/include/python3.4m"
    0
    0
    1
    2
    0
    Failure
    0
    0
    1
    2
    2
    Success
    
  • The below line produces the same output as above (if the Python 3 executable path is valid):
    $ python3 ./nested_word_parser.py
    

About

Tool to parse Nested Words in a given sequence using the Ragel State Machine Compiler, 2017.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published