alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Scala example source code file (NewScalaParserXXX.scala)

This example Scala source code file (NewScalaParserXXX.scala) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Scala tags/keywords

mynewline, newline, newline, newlineimpl, newlineimpl, newscalascannerxxx, node, nodeimpl, statement, statement, statementimpl, unfixed, unfixedimpl, unfixedimpl

The Scala NewScalaParserXXX.scala source code

package bug831;

trait ScalaNodeScannerXXX {
  type Node <: NodeImpl;
  trait NodeImpl { def self : Node; }
  type Unfixed <: Node with UnfixedImpl;
  trait UnfixedImpl extends NodeImpl { def self : Unfixed; }
}
//def f = { Console.println("hello"); 42; }
//for (val ns <-n; val i <- 0.until(ns)) yield f;


trait NewScalaScannerXXX extends ScalaNodeScannerXXX { 
  type Unfixed <: Node with UnfixedImpl;
  trait UnfixedImpl extends super.UnfixedImpl with NodeImpl;
  type Statement <: Unfixed with StatementImpl;
  trait StatementImpl extends UnfixedImpl { def self : Statement; }
  type NewLine <: Statement with NewLineImpl;
  trait NewLineImpl extends StatementImpl { 
    def self : NewLine; 
    def isActive : Boolean = true;
  }
  object ArrowMode extends Enumeration { val Def, Case, Expr = Value }
}

trait ScalaPrecedenceXXX extends NewScalaScannerXXX { 
  type NewLine <: Statement with NewLineImpl;
  trait NewLineImpl extends super.NewLineImpl with StatementImpl {  
    def self : NewLine; 
    override def isActive = super[NewLineImpl].isActive;
  }
}
trait NewScalaParserXXX extends NewScalaScannerXXX with ScalaPrecedenceXXX {
  type NewLine <: Statement with NewLineImpl;
  trait MyNewLine extends super[NewScalaScannerXXX].NewLineImpl;
  trait NewLineImpl extends MyNewLine with 
    super[ScalaPrecedenceXXX].NewLineImpl with
    StatementImpl { 
    def self : NewLine; 
    override def isActive = super[MyNewLine].isActive;
  }
}

Other Scala examples (source code examples)

Here is a short list of links related to this Scala NewScalaParserXXX.scala source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.