Scala combinator parser
This is my attempt to get you started with scala combinator parser. It is a very powerful tool that allows you to create your own lexical analysis similar to yacc and other lexer. Area of application includes a) calculator that accept input string as follow "3+2" b) match specific text in a given string like finding "fox" in the string "the brown fox jump over the fence" I'm going to use an example from reference below. Here we are trying to extend our SimpleParser from RegexParser and defined a function called "word" that is basically a regex itself with the purpose of matching a single word. Simple Parser This code is taken from https://wiki.scala-lang.org/ import scala.util.parsing.combinator._ class SimpleParser extends RegexParsers { def word : Parser[ String ] = """[a-z]+""" .r ^^ { _.toString } } In code above, """ means it is a regex. ^^ mean if a match is found,...