import { LexerToken } from '../../interfaces/lexer-token'; import { CommandsBasicsDiverse } from '../commands/basics/diverse'; import { CommandsBasicsMaths } from '../commands/basics/maths'; import { CommandsBasicsStrings } from '../commands/basics/strings'; import { CommandsBasicsTimeRandom } from '../commands/basics/time-random'; import { CommandsDataBank } from '../commands/data/bank'; import { CommandsDataFileSystem } from '../commands/data/file-system'; import { CommandsGraphics2dDisplay } from '../commands/graphics2d/display'; import { CommandsGraphics2dGraphics } from '../commands/graphics2d/graphics'; import { CommandsGraphics2dImages } from '../commands/graphics2d/images'; import { CommandsGraphics2dMovies } from '../commands/graphics2d/movies'; import { CommandsGraphics2dPixel } from '../commands/graphics2d/pixel'; import { CommandsGraphics2dText } from '../commands/graphics2d/text'; import { CommandsGraphics3dAnimations } from '../commands/graphics3d/animations'; import { CommandsGraphics3dBrushes } from '../commands/graphics3d/brushes'; import { CommandsGraphics3dCamera } from '../commands/graphics3d/camera'; import { CommandsGraphics3dCollisions } from '../commands/graphics3d/collisions'; import { CommandsGraphics3dControls } from '../commands/graphics3d/controls'; import { CommandsGraphics3dCoordinates } from '../commands/graphics3d/coordinates'; import { CommandsGraphics3dDiverse } from '../commands/graphics3d/diverse'; import { CommandsGraphics3dLightShadow } from '../commands/graphics3d/light-shadow'; import { CommandsGraphics3dMeshes } from '../commands/graphics3d/meshes'; import { CommandsGraphics3dPicking } from '../commands/graphics3d/picking'; import { CommandsGraphics3dScene } from '../commands/graphics3d/scene'; import { CommandsGraphics3dScenery } from '../commands/graphics3d/scenery'; import { CommandsGraphics3dScreen } from '../commands/graphics3d/screen'; import { CommandsGraphics3dSprites } from '../commands/graphics3d/sprites'; import { CommandsGraphics3dStatus } from '../commands/graphics3d/status'; import { CommandsGraphics3dSurfaces } from '../commands/graphics3d/surfaces'; import { CommandsGraphics3dTerrain } from '../commands/graphics3d/terrain'; import { CommandsGraphics3dTextures } from '../commands/graphics3d/textures'; import { CommandsGuiButton } from '../commands/gui/button'; import { CommandsGuiCanvas } from '../commands/gui/canvas'; import { CommandsGuiDesktop } from '../commands/gui/desktop'; import { CommandsGuiDiverse } from '../commands/gui/diverse'; import { CommandsGuiEvent } from '../commands/gui/event'; import { CommandsGuiGadget } from '../commands/gui/gadget'; import { CommandsGuiHTML } from '../commands/gui/html'; import { CommandsGuiIconStrip } from '../commands/gui/icon-strip'; import { CommandsGuiListTabber } from '../commands/gui/list-tabber'; import { CommandsGuiMenu } from '../commands/gui/menu'; import { CommandsGuiPanel } from '../commands/gui/panel'; import { CommandsGuiProgressBar } from '../commands/gui/progress-bar'; import { CommandsGuiRequest } from '../commands/gui/request'; import { CommandsGuiSlider } from '../commands/gui/slider'; import { CommandsGuiTextArea } from '../commands/gui/text-area'; import { CommandsGuiTextField } from '../commands/gui/text-field'; import { CommandsGuiToolbar } from '../commands/gui/toolbar'; import { CommandsGuiTreeView } from '../commands/gui/tree-view'; import { CommandsGuiWindow } from '../commands/gui/window'; import { CommandsIOGamepad } from '../commands/io/gamepad'; import { CommandsIOKeyboard } from '../commands/io/keyboard'; import { CommandsIOMouse } from '../commands/io/mouse'; import { CommandsSound3D } from '../commands/sound/3d'; import { CommandsSoundChannels } from '../commands/sound/channels'; import { CommandsSoundMusicSamples } from '../commands/sound/music-samples'; import { BBScriptCode } from '../../interfaces/bbscript-code'; import { GeneralService } from '../general/general.service'; import { GameStateService } from '../game-state/game-state.service'; import { ParserState } from '../../enums/parser/parser-state'; import { LanguageService } from '../language/language.service'; export declare class Parser { private generalService; private gameState; private language; private commandsBasicsDiverse; private commandsBasicsMaths; private commandsBasicsStrings; private commandsBasicsTimeRandom; private commandsDataBank; private commandsDataFileSystem; private commandsGraphics2dDisplay; private commandsGraphics2dGraphics; private commandsGraphics2dImages; private commandsGraphics2dMovies; private commandsGraphics2dPixel; private commandsGraphics2dText; private commandsGraphics3dAnimations; private commandsGraphics3dBrushes; private commandsGraphics3dCamera; private commandsGraphics3dCollisions; private commandsGraphics3dControls; private commandsGraphics3dCoordinates; private commandsGraphics3dDiverse; private commandsGraphics3dLightShadow; private commandsGraphics3dMeshes; private commandsGraphics3dPicking; private commandsGraphics3dScene; private commandsGraphics3dScenery; private commandsGraphics3dScreen; private commandsGraphics3dSprites; private commandsGraphics3dStatus; private commandsGraphics3dSurfaces; private commandsGraphics3dTerrain; private commandsGraphics3dTextures; private commandsGuiButton; private commandsGuiCanvas; private commandsGuiDesktop; private commandsGuiDiverse; private commandsGuiEvent; private commandsGuiGadget; private commandsGuiHTML; private commandsGuiIconStrip; private commandsGuiListTabber; private commandsGuiMenu; private commandsGuiPanel; private commandsGuiProgressBar; private commandsGuiRequest; private commandsGuiSlider; private commandsGuiTextArea; private commandsGuiTextField; private commandsGuiToolbar; private commandsGuiTreeView; private commandsGuiWindow; private commandsIOGamepad; private commandsIOKeyboard; private commandsIOMouse; private commandsSound3D; private commandsSoundChannels; private commandsSoundMusicSamples; static MESSAGE: { 'ERROR': { 'DEPRECATED_KEYWORD': { EN: string; DE: string; }; 'DEPRECATED_COMMAND': { EN: string; DE: string; }; 'INVALID_TOKEN': { EN: string; DE: string; }; 'INVALID_START_TOKEN': { EN: string; DE: string; }; 'ILLEGAL_CONTEXT': { EN: string; DE: string; }; 'VAR_NAME_EXPECTED': { EN: string; DE: string; }; 'TOO_MANY_PARAMETERS': { EN: string; DE: string; }; 'NOT_ENOUGH_PARAMETERS': { EN: string; DE: string; }; 'COMMA_MUST_BE_FOLLOWED_BY_EXPRESSION': { EN: string; DE: string; }; 'MISSING_OPENING_BRACKET': { EN: string; DE: string; }; 'NO_MORE_TOKENS_ALLOWED': { EN: string; DE: string; }; 'NO_CONDITION_BLOCK_OPENED': { EN: string; DE: string; }; 'DUPLICATE_DECLARATION': { EN: string; DE: string; }; TODO: { EN: string; DE: string; }; }; 'INFO': {}; 'WARNING': {}; }; individuals: object; stack: any[]; state: any; gameCode: BBScriptCode; constructor(generalService: GeneralService, gameState: GameStateService, language: LanguageService, commandsBasicsDiverse: CommandsBasicsDiverse, commandsBasicsMaths: CommandsBasicsMaths, commandsBasicsStrings: CommandsBasicsStrings, commandsBasicsTimeRandom: CommandsBasicsTimeRandom, commandsDataBank: CommandsDataBank, commandsDataFileSystem: CommandsDataFileSystem, commandsGraphics2dDisplay: CommandsGraphics2dDisplay, commandsGraphics2dGraphics: CommandsGraphics2dGraphics, commandsGraphics2dImages: CommandsGraphics2dImages, commandsGraphics2dMovies: CommandsGraphics2dMovies, commandsGraphics2dPixel: CommandsGraphics2dPixel, commandsGraphics2dText: CommandsGraphics2dText, commandsGraphics3dAnimations: CommandsGraphics3dAnimations, commandsGraphics3dBrushes: CommandsGraphics3dBrushes, commandsGraphics3dCamera: CommandsGraphics3dCamera, commandsGraphics3dCollisions: CommandsGraphics3dCollisions, commandsGraphics3dControls: CommandsGraphics3dControls, commandsGraphics3dCoordinates: CommandsGraphics3dCoordinates, commandsGraphics3dDiverse: CommandsGraphics3dDiverse, commandsGraphics3dLightShadow: CommandsGraphics3dLightShadow, commandsGraphics3dMeshes: CommandsGraphics3dMeshes, commandsGraphics3dPicking: CommandsGraphics3dPicking, commandsGraphics3dScene: CommandsGraphics3dScene, commandsGraphics3dScenery: CommandsGraphics3dScenery, commandsGraphics3dScreen: CommandsGraphics3dScreen, commandsGraphics3dSprites: CommandsGraphics3dSprites, commandsGraphics3dStatus: CommandsGraphics3dStatus, commandsGraphics3dSurfaces: CommandsGraphics3dSurfaces, commandsGraphics3dTerrain: CommandsGraphics3dTerrain, commandsGraphics3dTextures: CommandsGraphics3dTextures, commandsGuiButton: CommandsGuiButton, commandsGuiCanvas: CommandsGuiCanvas, commandsGuiDesktop: CommandsGuiDesktop, commandsGuiDiverse: CommandsGuiDiverse, commandsGuiEvent: CommandsGuiEvent, commandsGuiGadget: CommandsGuiGadget, commandsGuiHTML: CommandsGuiHTML, commandsGuiIconStrip: CommandsGuiIconStrip, commandsGuiListTabber: CommandsGuiListTabber, commandsGuiMenu: CommandsGuiMenu, commandsGuiPanel: CommandsGuiPanel, commandsGuiProgressBar: CommandsGuiProgressBar, commandsGuiRequest: CommandsGuiRequest, commandsGuiSlider: CommandsGuiSlider, commandsGuiTextArea: CommandsGuiTextArea, commandsGuiTextField: CommandsGuiTextField, commandsGuiToolbar: CommandsGuiToolbar, commandsGuiTreeView: CommandsGuiTreeView, commandsGuiWindow: CommandsGuiWindow, commandsIOGamepad: CommandsIOGamepad, commandsIOKeyboard: CommandsIOKeyboard, commandsIOMouse: CommandsIOMouse, commandsSound3D: CommandsSound3D, commandsSoundChannels: CommandsSoundChannels, commandsSoundMusicSamples: CommandsSoundMusicSamples); /** * Resets (or initializes) the parser object, as well as helper variables. */ resetParser(): void; /** * Retrieves all global variables, constants, dim-arrays, function and type names * from a given lexer code. * @param lexerCode An array of lexer token arrays, preprocessed by the lexer */ getIndividuals(lexerCode: Array): any; /** * Retrieves all local variables from a given lexer code. * If a function name is passed, only local variables of this function will be retrieved. * Otherwise, all local variables of all code functions will be retrieved. * @param lexerCode * @param fn */ getLocals(lexerCode: Array, fn?: string): any; /** RULES **/ createGameCode(lexerCode: Array): any; parseState(state: ParserState, tokens: LexerToken[]): void; parseCondition(tokens: LexerToken[]): void; /** * Parses a comparison based on the comparison operator's index. * @param tokens A lexer token array * @param compIndex The position of the comparison operator */ parseComparison(tokens: LexerToken[], compIndex: number): void; parseLogicalLink(tokens: LexerToken[], linkIndex: number): void; parseExpression(tokens: LexerToken[]): void; }