NetLogo 6.2.2 - org.nlogo.core.Syntax
Keywords: NetLogo 6.2.2 org.nlogo.core.Syntax

NetLogo6.2.2 < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package org
  Definition Classes
    root
-  package nlogo
  Definition Classes
    org
-  package core
  Definition Classes
    nlogo
-  package model
  Definition Classes
    core
- AgentKind
- AgentKindJ
- AgentVariableSet
- AgentVariables
- AllShapesReplaced
- Application
- AstFolder
- AstNode
- AstTransformer
- AstVisitor
- BoxedValue
- Breed
- BreedIdentifierHandler
- Button
- Chooseable
- ChooseableBoolean
- ChooseableDouble
- ChooseableList
- ChooseableString
- Chooser
- ClosedLambdaVariable
- ClosedLet
- ClosedVariable
- Color
- ColorConstants
- Command
- CommandBlock
- CompilationEnvironment
- CompilationOperand
- CompilerException
- CompilerUtilitiesInterface
- ConstraintSpecification
- DeclaresConstraint
- DeclaresGlobal
- DeclaresGlobalCommand
- DefaultTokenMapper
- Dialect
- Direction
- DummyCompilationEnvironment
- DummyExtensionManager
- DummyLibraryManager
- Dump
- ErrorSource
- Expression
- ExtensionManager
- ExtensionObject
- Fail
- Femto
- File
- FileMode
- FileModeJ
- FrontEndInterface
- FrontEndProcedure
- Horizontal
- I18N
- I18NJava
- InputBox
- Instantiator
- Instruction
- Keywords
- Let
- LibraryInfo
- LibraryManager
- LibraryStatus
- LiteralImportHandler
- LiteralParser
- LogoList
- LowPriorityDialect
- Model
- ModelInfo
- Monitor
- NamedWidget
- NetLogoCore
- Nobody
- NumberParser
- NumericInput
- OptionalSection
- Output
- Pen
- Plot
- PlotPenInterface
- PlotPenState
- Primitive
- PrimitiveCommand
- PrimitiveReporter
- ProcedureDefinition
- ProcedureSyntax
- Program
- Pure
- Reference
- Referenceable
- Reporter
- ReporterApp
- ReporterBlock
- Resource
- Shape
- ShapeAdded
- ShapeEvent
- ShapeList
- ShapeListTracker
- ShapeParser
- ShapeRemoved
- ShapesAdded
- Slider
- SourceLocatable
- SourceLocation
- SourceRelocatable
- SourceRewriter
- SourceWrapping
- Statement
- Statements
- StringEscaper
- StringInput
- StructureDeclarations
- StructureResults
- Switch
- Syntax
- SyntaxJ
- TextBox
- Token
- TokenColorizer
- TokenHolder
- TokenMapper
- TokenMapperInterface
- TokenType
- TokenTypeJ
- TokenizerInterface
- TypeNames
- UpdateMode
- UpdateModeJ
- VersionUtils
- Vertical
- View
- Widget
- WorldDimensions

c

org.nlogo.core

# Syntax 

###
Companion object Syntax

#### case class Syntax extends Product with Serializable

Specifies the arguments accepted by a primitive. Used by the compiler for type-checking.

You cannot instantiate this class directly. Instead, use the static construction methods `Syntax.commandSyntax(...)` or `Syntax.reporterSyntax(...)`.

For example, in a `Reporter` that takes two number arguments and returns a boolean, implement `Primitive.getSyntax()` as follows:

    public Syntax getSyntax() {
      return Syntax.reporterSyntax(
        new int[] { Syntax.NumberType(), Syntax.NumberType() },
        Syntax.BooleanType());
    }

An input can be made variadic, meaning that it can be repeated any number of times when enclosed in parentheses, if you add the `RepeatableType` flag. When using variadic inputs you should also define the default number of inputs, that is, the number of inputs expect if the user does not use parentheses. For example:

     public Syntax getSyntax() {
       return Syntax.reporterSyntax(
         new int[] { Syntax.WildcardType() | Syntax.RepeatableType() },
         Syntax.ListType(), 2);
     }

Source
  Syntax.scala
See also

  Primitive#getSyntax()

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. Syntax
2. Serializable
3. Serializable
4. Product
5. Equals
6. AnyRef
7. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  val agentClassString: String
5.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
6.  val blockAgentClassString: Option[String]
7.  val canBeConcise: Boolean
8.  def clone(): AnyRef
   Attributes
     protected[lang]
   Definition Classes
     AnyRef
   Annotations
     @throws( ... ) @native()
9.  val defaultOption: Option[Int]
10.  def dfault: Int
11.  def dump: String
12.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
13.  def finalize(): Unit
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
14.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
15.  val introducesContext: Boolean
16.  def isInfix: Boolean

    indicates whether this instruction should be parsed as infix.

    indicates whether this instruction should be parsed as infix. Infix instructions expect exactly one argument on the left and should not be variadic on the right.

    returns

      true if this instruction is infix, false otherwise.

17.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
18.  val isRightAssociative: Boolean
19.  def isVariadic: Boolean

    determines whether an instruction allows a variable number of args.

20.  val left: Int
21.  def minimum: Int
22.  val minimumOption: Option[Int]
23.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
24.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
25.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
26.  val precedence: Int
27.  val ret: Int
28.  val right: List[Int]
29.  def rightDefault: Int

    returns the number of args this instruction takes on the right by default.

30.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
31.  def takesOptionalCommandBlock: Boolean
32.  def totalDefault: Int

    returns the total number of args, left and right, this instruction takes by default.

33.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
34.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
35.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... ) @native()

### Inherited from Serializable

### Inherited from Product

### Inherited from Equals

### Inherited from AnyRef

### Inherited from Any

### Ungrouped