text: ﻿using DotNet;
  
  using Nemerle.Collections;
  
  using Nitra.AstUtils;
  using Nitra.Declarations;
  using Nitra.Utils;
  
  using System.Drawing;
  
  using R = Nitra.Ast.RegexExpressions;
  
  namespace Nitra.Ast.RegexExpressions
  {
    abstract ast Expression : BindableAst
    {
    }
  
    abstract ast Unary : R.Expression
    {
      Expression.Scope = Scope;
      Expression : R.Expression;
    }
  
    abstract ast Binary : R.Expression
    {
      Expression1.Scope = Scope;
      Expression2.Scope = Scope;
  
      Expression1 : R.Expression;
      Expression2 : R.Expression;
    }
  
    abstract ast List : R.Unary
    {
      Expressions.Scope = Scope;
  
      Expressions : R.Expression*;
    }
  
    ast Sequence            : R.List { }
    ast Choice              : R.List { }
    ast Subtract            : R.Binary { }
    ast Optional            : R.Unary { }
    ast Repeat              : R.Unary { }
    ast RepeatWithSeparator : R.Unary
    {
      Separator.Scope = Scope;
      Separator : R.Expression;
    }
  
    ast Call            : R.Expression
    {
      RuleReference.Scope = Scope;
  
      RuleReference : QualifiedReference;
    }
  
    ast Char            : R.Expression { Literal : CharLiteral; }
    ast String          : R.Expression { Literal : StringLiteral; }
    ast Range           : R.Expression {  }
    ast InvertedRange   : R.Expression {  }
  }
  