public interface EmbeddedCodeProcessor
| Modifier and Type | Method and Description |
|---|---|
boolean |
generateConstant(Lexer lexer,
char characterType)
Scan the stream unti a string that starts with the given character ends
|
boolean |
generateDollarDollar(Lexer lexer,
int elementCount,
String nonTerminalId,
Type type)
$$ detected.
|
boolean |
generateDollarLetter(Lexer lexer,
int elementCount,
Type type,
String nonTerminalId)
$Letter was detected.
|
boolean |
generateDollarNumber(Lexer lexer,
int elementCount,
Type type,
int sign)
$1, $2, $-3, etc detected.
|
Type |
getTypeFromStream(Lexer lexer)
Retrieve the type embedded as in $<type>1
|
boolean |
skipAndOutputCompositeComment(Lexer lexer,
char secondaryCharacter,
char primaryCharacter)
Skip a comment, and copying it to the output
|
Type getTypeFromStream(Lexer lexer)
lexer - the element that will give me the lexical logicboolean generateConstant(Lexer lexer, char characterType)
lexer - the object in charge of managing the input streamcharacterType, - is the starting characterboolean generateDollarNumber(Lexer lexer, int elementCount, Type type, int sign)
lexer - the element that will give me the lexical logicelementCount - the number of elements in the ruletype - the type of the elementsign - is one for possitive, or -1 for negativeboolean generateDollarDollar(Lexer lexer, int elementCount, String nonTerminalId, Type type)
lexer - the element that will give me the lexical logicelementCount - the number of elements in the rulenonTerminalId - the non terminal id for the ruletype - the type of the elementboolean generateDollarLetter(Lexer lexer, int elementCount, Type type, String nonTerminalId)
When two rule items have the same symbol, a disambiguating index like $Symbol[1], $Symbol[2], etc. can be used. The Left hand symbol is only used when non indexed;
lexer - the element that will give me the lexical logicelementCount - the number of elements in the rulenonTerminalId - the non terminal id for the ruletype - the type of the elementboolean skipAndOutputCompositeComment(Lexer lexer, char secondaryCharacter, char primaryCharacter)
lexer - the element that will give me the lexical logicprimaryCharacter, - for example /secondaryCharacter, - for example *Copyright © 2017. All rights reserved.