Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jpicedt.format.pstricks.parser
Class PstricksParser  view PstricksParser download PstricksParser.java

java.lang.Object
  extended byjpicedt.graphic.io.parser.AbstractRegularExpression
      extended byjpicedt.graphic.io.parser.AlternateExpression
          extended byjpicedt.graphic.io.parser.RootExpression
              extended byjpicedt.format.pstricks.parser.PstricksParser
All Implemented Interfaces:
jpicedt.graphic.io.parser.ExpressionConstants

public class PstricksParser
extends jpicedt.graphic.io.parser.RootExpression
implements jpicedt.graphic.io.parser.ExpressionConstants

Root expression for the Pstricks parser, containing grammar rules for the pstricks format. Pstricks support is pretty ok, though add-ons (like pst-nodes.sty) are still missing.

This class consists of grammar rules, wrapped in a RootExpression which can itself be directly added to the main tree (for instance, using DefaultParser.addGrammar()).

Note : the current parser used across the JPicEdt application can be retrieved using jpicedt.JPicEdt.getParser().

[TODO] : \psgrid, \psaxes, arrow size, dot style.

Version:
$Id: PstricksParser.java,v 1.2 2002/08/05 16:44:10 reynal Exp $

Field Summary
static jpicedt.graphic.io.parser.Pool.Key KEY_ATTRIBUTES
          key associated with the attribute set which stores PsTricks default graphical parameters (PicAttributeSet)
static jpicedt.graphic.io.parser.Pool.Key KEY_NEWPSOBJECTS
          \\newpsobject : key associated with the HashMap that associates pairs "macroName -> param_string", e.g.
static jpicedt.graphic.io.parser.Pool.Key KEY_R_UNIT
          key associated with \\psrunit register (double)
static jpicedt.graphic.io.parser.Pool.Key KEY_USER_COLOURS
          user-defined colours (a HashMap which gets filled by UserDefinedColorsExpression, see \\newgray, \\newrgbcolor,...
static jpicedt.graphic.io.parser.Pool.Key KEY_X_UNIT
          key associated with \\psxunit register (double)
static jpicedt.graphic.io.parser.Pool.Key KEY_Y_UNIT
          key associated with \\psyunit register (double)
private  jpicedt.graphic.io.parser.Pool pool
           
 
Fields inherited from class jpicedt.graphic.io.parser.AlternateExpression
 
Fields inherited from interface jpicedt.graphic.io.parser.ExpressionConstants
ANY_CHAR, ANY_CHAR_EOL, ANY_SIGN, AT_LEAST, AT_MOST, DEBUG, DOUBLE, EOL, EXACTLY, INTEGER, NEGATIVE, NON_NULL, POSITIVE, STRICTLY_NEGATIVE, STRICTLY_POSITIVE, WHITE_SPACES, WHITE_SPACES_OR_EOL
 
Constructor Summary
PstricksParser(jpicedt.graphic.io.parser.Pool pool)
          Creates a new PstricksParser, and build grammar rules
 
Method Summary
 void reinit()
          reinit shared parameters belonging to the Pool
 
Methods inherited from class jpicedt.graphic.io.parser.AlternateExpression
add, getExpressionList, interpret, toString
 
Methods inherited from class jpicedt.graphic.io.parser.AbstractRegularExpression
action
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_X_UNIT

public static final jpicedt.graphic.io.parser.Pool.Key KEY_X_UNIT
key associated with \\psxunit register (double)


KEY_Y_UNIT

public static final jpicedt.graphic.io.parser.Pool.Key KEY_Y_UNIT
key associated with \\psyunit register (double)


KEY_R_UNIT

public static final jpicedt.graphic.io.parser.Pool.Key KEY_R_UNIT
key associated with \\psrunit register (double)


KEY_ATTRIBUTES

public static final jpicedt.graphic.io.parser.Pool.Key KEY_ATTRIBUTES
key associated with the attribute set which stores PsTricks default graphical parameters (PicAttributeSet)


KEY_USER_COLOURS

public static final jpicedt.graphic.io.parser.Pool.Key KEY_USER_COLOURS
user-defined colours (a HashMap which gets filled by UserDefinedColorsExpression, see \\newgray, \\newrgbcolor,... in PsTricks documentation p.5)


KEY_NEWPSOBJECTS

public static final jpicedt.graphic.io.parser.Pool.Key KEY_NEWPSOBJECTS
\\newpsobject : key associated with the HashMap that associates pairs "macroName -> param_string", e.g. "\\myline" -> "linecolor=green,filltype=solid" (HashMap)


pool

private jpicedt.graphic.io.parser.Pool pool
Constructor Detail

PstricksParser

public PstricksParser(jpicedt.graphic.io.parser.Pool pool)
Creates a new PstricksParser, and build grammar rules

Method Detail

reinit

public void reinit()
reinit shared parameters belonging to the Pool