metormaon / flue Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Cycle detection, etc. API for choosing how to break cycles
Read paper by Gil and Tsoglin on Jamoos.
Beamer presentation if you can...
The Java grammar is sometimes intentionally stupid.... to make it easier to write a parser:
StatementNoShortIf >> StatementWithoutTrailingSubstatement
| LabeledStatementNoShortIf
| IfThenElseStatementNoShortIf
| WhileStatementNoShortIf
| ForStatementNoShortIf
```
Sounds a hack/ while the following requires refactoring:
```
WhileStatement >> "while" & "(" & Expression & ")" & Statement
WhileStatementNoShortIf >> "while" & "(" & Expression & ")" & StatementNoShortIf
````
this should use as a procedure the optimization algorithm of #3
Again, you need some research on how to do that in stackexchange.
can do without minimization of DFSA, but please DO minimization.
Whenever there is a cycle, use strongly connected components algorithm to choose the correct inlining.
Change class names, and nullable() and first() accordingly.
When it makes sense.
Symbols occurring twice: BooleanLiteral, CharacterLiteral, CompilationUnit
ConstantExpression, FloatingPointLiteral, IntegerLiteral, NullLiteral
StringLiteral, VariableAccess
Should inline:
3 AnnotationTypeBody
3 AnnotationTypeDeclaration
3 AnnotationTypeElementDeclaration
3 AnnotationTypeElementModifier
3 AnnotationTypeMemberDeclaration
3 ArrayCreationExpression
3 AssertStatement
3 AssignmentExpression
3 AssignmentOperator
3 BasicForStatement
3 BasicForStatementNoShortIf
3 BreakStatement
3 CastExpression
3 CatchFormalParameter
3 CatchType
3 ClassLiteral
3 ClassMemberDeclaration
3 ClassOrInterfaceTypeToInstantiate
3 ConstantModifier
3 ConstructorBody
3 ConstructorDeclaration
3 ConstructorDeclarator
3 ConstructorModifier
3 ContinueStatement
3 DefaultValue
3 DoStatement
3 ElementValueArrayInitializer
3 ElementValueList
3 ElementValuePairList
3 EmptyStatement
3 EnhancedForStatement
3 EnhancedForStatementNoShortIf
3 EnumBody
3 EnumBodyDeclarations
3 EnumConstantList
3 EnumConstantModifier
3 EnumDeclaration
3 ExceptionTypeList
3 ExplicitConstructorInvocation
3 ExpressionStatement
3 ExtendsInterfaces
3 FieldDeclaration
3 FieldModifier
3 FloatingPointType
3 ForStatement
3 ForStatementNoShortIf
3 IdentifierChars
3 IfThenElseStatement
3 IfThenElseStatementNoShortIf
3 IfThenStatement
3 InstanceInitializer
3 IntegralType
3 InterfaceBody
3 InterfaceMemberDeclaration
3 InterfaceMethodDeclaration
3 InterfaceMethodModifier
3 JavaLetter
3 JavaLetterOrDigit
3 LabeledStatement
3 LabeledStatementNoShortIf
3 LambdaBody
3 LambdaParameterList
3 LambdaParameters
3 LambdaParameterType
3 LeftHandSide
3 LocalVariableDeclarationStatement
3 MarkerAnnotation
3 MethodDeclaration
3 MethodModifier
3 MethodName
3 MethodReference
3 ModularCompilationUnit
3 ModuleDeclaration
3 ModuleDirective
3 NormalAnnotation
3 NormalClassDeclaration
3 NormalInterfaceDeclaration
3 OrdinaryCompilationUnit
3 PackageDeclaration
3 PackageModifier
3 RequiresModifier
3 ResourceList
3 ResourceSpecification
3 ReturnStatement
3 SimpleTypeName
3 SingleElementAnnotation
3 SingleStaticImportDeclaration
3 SingleTypeImportDeclaration
3 StaticImportOnDemandDeclaration
3 StaticInitializer
3 Superclass
3 SwitchBlockStatementGroup
3 SwitchExpression
3 SwitchStatement
3 SynchronizedStatement
3 TryStatement
3 TryWithResourcesStatement
3 TypeArgumentList
3 TypeArgumentsOrDiamond
3 TypeBound
3 TypeDeclaration
3 TypeImportOnDemandDeclaration
3 TypeParameterList
3 TypeParameterModifier
3 UnannArrayType
3 UnannInterfaceType
3 UnannReferenceType
3 UnqualifiedMethodIdentifier
3 VariableInitializerList
3 void
3 while
3 WhileStatement
3 WhileStatementNoShortIf
3 Wildcard
3 WildcardBounds
3 YieldStatement
We need to sort all rules in the Java examples to categories:
interface A { }
final class B extends A{}
final class C extends A{}
final class D extends A{}
enum A { B, C, D };
Data structure, with three operations:
class A { B b; C c; }
List, e.g., A -> B {C} D
class A { B b; List<C> cs; D d;}
optional, e.g., A -> B [C] D
class A { B b; Optional<C> c; D d;}
Of course, there may be nesting, e.e.,g a list of enums, list of lists, etc.
with operations of "export to classes".
Specifically there is an algorithm that removes all inaccessible states. Do a a search in cs.theory.stackexchange
for example: q(0).on(x).to(2)
or q(0,1,2).on(t).to(12)
q: 0,1,2 on: 2 to: 3.
q0: 12
F: 12, 14, 15
For example:
~"[a-z]+"
Groovy will treat them as Pattern objects, which means a new rule element to support.
The inliing cytcles problem should is a reduction to a familiar problem. Create a directed graph from a grammar like so: If there is a rule A-< B C, then symbol A depends on symbol B,
and there is and an edge from A to B. Similarly, there is an edge from A to C. The problem is to find cycles in this graph. Or more generally, strongly connected components.
See this algorithm: https://en.wikipedia.org/wiki/Strongly_connected_component
One needs an algorithm for this. For example, in the rule:
IfThenStatement >> "if" & "(" & Expression & ")" & Statement
```
translates to
class IfThenStatement { Expression Expression; Statement Statement; }
nullable over Then is incorrect.
So, you can write "list of identifiers, separated by dot"'; the current grammar uses recursion, sinc e
The regular expression in the rule body must be accessible; perhaps not modifiable, but it should be able to create a rule
programmatically so that one can develop and run algorithms such as first and follow on the set of rules.
https://web.eecs.umich.edu/~weimerw/2009-4610/reading/FirstFollowLL.pdf
installation instructions
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.