leowoerteler / chartygui Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Allow the use of custom display types. Realized with the help of the ini file introduced in #11.
A display type field where the class name of the display type can be set and the specified class is
constructed at start up (default constructor). This allows to use own display types (must be included in
the class path though).
The syntax for specifying the context-free grammar isn't very expressive, some enhancements would be:
allow grouping, optional parts (?
) repetition (*
and +
) in right-hand sides (RHS) of rules:
A -> (B C?)+ D*
more than one RHS, separated by e.g. |
:
Lit -> NumLit
| StrLit
A README file (preferably MarkDown) should suffice.
Terminals in the grammar (like N -> cat
) should be easily distinguishable from non-terminals like VP -> V NP
. This could be achieved by enclosing literal strings in double-quotes: N -> "cat"
.
Creating an empty grammar with a "New File" action in the menu.
Maybe defaulting to load the example grammar as unspecified file.
Parsing a large sentence like Mary killed the man with the tie with the tie with the tie with the tie with the tie with the tie with the tie with the tie with the tie with the tie with the tie with the tie with the tie with the tie causes following exception:
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
at java.awt.image.Raster.createPackedRaster(Raster.java:458)
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
at java.awt.image.BufferedImage.<init>(BufferedImage.java:324)
at de.woerteler.tree.ImageDisplay.getImage(ImageDisplay.java:38)
at de.woerteler.charty.ParseTree.getImage(ParseTree.java:42)
at de.woerteler.gui.Controller.navigate(Controller.java:102)
at de.woerteler.gui.ParseTreeViewer$3.actionPerformed(ParseTreeViewer.java:102)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6373)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6138)
at java.awt.Container.processEvent(Container.java:2085)
at java.awt.Component.dispatchEventImpl(Component.java:4735)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Component.dispatchEvent(Component.java:4565)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4621)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
at java.awt.Container.dispatchEventImpl(Container.java:2129)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4565)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:679)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:638)
at java.awt.EventQueue$1.run(EventQueue.java:636)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
While ambiguous grammars are unavoidable in natural language parsing, non-terminating ones are unacceptable. The parser should detect and warn about all recursive loops that consume no input, like this one:
A -> B C
B -> A
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.