ScalaIOHandling

de.uni_luebeck.isp.tessla.tessla_compiler.backends.scalaBackend.ScalaIOHandling$

Class containing code for parsing values from and to strings. Used for generating the input/output parsing from stdio.

NOTE: A general parsing method which can be executed at runtime is not possible for input parsing since tuples of various type cannot be generated. Replacing tuples internally by Seq[Any] would be a solution but isn't nice at all

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Value members

Concrete methods

def getInputParseExpression(to: ImpLanType, exp: String, freshVarCount: Int): String

Produces an expression in Scala which is parsing a value from a string to a concrete value

Produces an expression in Scala which is parsing a value from a string to a concrete value

Attributes

exp

The expression which evaluates to the string that is parsed

freshVarCount

A counter for fresh vars which are used in the parse expression. Must be incremented by 1 every time a fresh var is introduced

to

The type to which the input should be parsed

Returns:

A scala expression with exp as subexpression returning a value of type to

def getParseExpressionToString(from: ImpLanType, exp: String, freshVarCount: Int): String

Produces a Scala expression generating a string representation of a value that can be printed to stdout

Produces a Scala expression generating a string representation of a value that can be printed to stdout

Attributes

exp

The expression evaluating to the value which shall be converted

freshVarCount

A counter for fresh vars which are used in the conversion expression. Must be incremented by 1 every time a fresh var is introduced

from

Type of the value from which the string is generated

Returns:

Conversion expression in Scala