Skip to content
Snippets Groups Projects
Commit 7eec21ff authored by Lior Spach's avatar Lior Spach
Browse files

Init

parent 11bd8c86
No related branches found
No related tags found
No related merge requests found
import io.{Source,BufferedSource}
case class Atomo(val valor:String, val token:String)
object Lexer {
def getTokens(stream:Iterator[Char]):List[atomo] = {
var proximo: Char = ''
var acc = ""
def PROX = if (stream.hasNext) proximo = stream.next
def ADD = acc + proximo
PROX
proximo match { //TODO: Pattern Matching
case ' ' || '\t' || '\n' =>
case letra =>
case numero =>
case simbolo_especial =>
}
}
}
val Pattern = """\(([a-cA-C]{3})\)""".r
args(0) match {
case Pattern(c) => println(c)
case _ =>
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment