summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreea1 <eea1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-20 18:30:59 +0000
committereea1 <eea1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-20 18:30:59 +0000
commita8159afa87224aaf5c0ed010ba0ec611184c1766 (patch)
tree7ea063e91b0c960caf92f96d226ea055f0c91251
parent2842b70e8ea58d1d514f0f634e39c87b84a02485 (diff)
downloadATCD-a8159afa87224aaf5c0ed010ba0ec611184c1766.tar.gz
Removed two more files related to CUP and JLex.
-rw-r--r--java/src/Svc_Conf.y208
-rw-r--r--java/src/Yylex.lex78
2 files changed, 0 insertions, 286 deletions
diff --git a/java/src/Svc_Conf.y b/java/src/Svc_Conf.y
deleted file mode 100644
index a11a18f9af0..00000000000
--- a/java/src/Svc_Conf.y
+++ /dev/null
@@ -1,208 +0,0 @@
-package JACE.ServiceConfigurator;
-
-import java.io.*;
-import java_cup.runtime.*;
-import JACE.OS.*;
-
-parser code {:
- // Lexical Analyzer
- private Yylex lexer_;
-
- public void setLexer(Yylex lexer)
- {
- this.lexer_ = lexer;
- }
-:};
-
-init with {:
- try {
-
- FileInputStream fs = new FileInputStream(new String(ServiceConfig.serviceConfigFile_));
-
- this.setLexer(new Yylex(fs));
-
- } catch (FileNotFoundException fnf) {
-
- ACE.ERROR("File not found: " + fnf);
-
- } catch (SecurityException se) {
-
- ACE.ERROR("Security: " + se);
- }
-:};
-
-scan with {: return this.lexer_.yylex(); :};
-
-terminal token ACE_DYNAMIC, ACE_STATIC, ACE_SUSPEND, ACE_RESUME, ACE_REMOVE, ACE_STREAM;
-terminal token ACE_MODULE_T, ACE_STREAM_T, ACE_SVC_OBJ_T, ACE_ACTIVE, ACE_INACTIVE;
-terminal str_token ACE_PATHNAME, ACE_IDENT, ACE_STRING;
-terminal token ACE_LPAREN, ACE_RPAREN, ACE_LBRACE, ACE_RBRACE, ACE_STAR, ACE_COLON;
-terminal token ACE_USTREAM;
-
-non terminal AddServiceObjectNode dynamic, svc_location; /* AddServiceObjectNode */
-non terminal SuspendNode suspend; /* SuspendNode */
-non terminal ResumeNode resume; /* ResumeNode */
-non terminal RemoveNode remove; /* RemoveNode */
-non terminal ParseNode module_list, stream, svc_config_entry;
-non terminal ParseNode svc_config_entries, static;
-non terminal java_cup.runtime.str_token stream_modules, module;
-non terminal java_cup.runtime.int_token status;
-non terminal java_cup.runtime.str_token svc_initializer;
-non terminal java_cup.runtime.str_token pathname, parameters_opt;
-non terminal java_cup.runtime.str_token stream_ops, type;
-
-start with svc_config_entries;
-
-svc_config_entries ::= svc_config_entry:e1 svc_config_entries
- {:
- if (e1 != null)
- e1.apply();
- :}
- |
- svc_config_entry:e1
- {:
- if (e1 != null)
- e1.apply();
- :}
- ;
-
-svc_config_entry ::= dynamic
- {:
- /* Empty -- result auto set to dynamic */
- /* CUP$result = (ParseNode)CUP$stack.elementAt(CUP$top-0); */
- :}
- |
- static
- {:
- /* More graceful error system needed here */
- ACE.ERROR("Not implemented: static service loading"); :}
- |
- suspend
- {:
- /* Empty -- result auto set to suspend */
- /* CUP$result = (ParseNode)CUP$stack.elementAt(CUP$top-0); */
- :}
- |
- resume
- {: /* Empty -- result auto set to resume */
- :}
- |
- remove
- {:
-
- :}
- |
- stream
- {: ACE.ERROR("Not implemented: stream loading"); :}
- ;
-
-dynamic ::= ACE_DYNAMIC svc_location:e1 parameters_opt:e2
-{:
- RESULT.init(e1.name(), e1.locator(), e1.suspended());
-
- RESULT.params(e2.str_val);
-:}
- ;
-
-static ::= ACE_STATIC ACE_IDENT parameters_opt
- ;
-
-suspend ::= ACE_SUSPEND ACE_IDENT:e1
-{:
- RESULT.init(e1.str_val);
-:}
- ;
-
-resume ::= ACE_RESUME ACE_IDENT:e1
-{:
- RESULT.init(e1.str_val);
-:}
- ;
-
-remove ::= ACE_REMOVE ACE_IDENT:e1
-{:
- RESULT.init(e1.str_val);
-:}
- ;
-
-stream ::= ACE_USTREAM stream_ops stream_modules
- |
- ACE_USTREAM ACE_IDENT stream_modules
- ;
-
-stream_ops ::= dynamic
- |
- static
- ;
-
-stream_modules ::= ACE_LBRACE
- |
- module_list ACE_RBRACE
- ;
-
-module_list ::= module_list module
- {: ACE.ERROR("Not implemented: module manipulation"); :}
- |
- {: ACE.ERROR("Not implemented: module manipulation"); :}
- ;
-
-module ::= dynamic
- |
- static
- |
- suspend
- |
- resume
- |
- remove
- ;
-
-svc_location ::= ACE_IDENT:e1 type:e2 svc_initializer:e3 status:e4
-{:
- boolean suspended = false;
- if (e4.int_val == 1)
- suspended = true;
-
- RESULT.init(e1.str_val, e3.str_val, suspended);
-:}
-;
-
-status ::= ACE_ACTIVE
- {: RESULT.int_val = 0; :}
- |
- ACE_INACTIVE
- {: RESULT.int_val = 1; :}
- |
- {: // Default case
- RESULT.int_val = 0; :}
- ;
-
-svc_initializer ::= pathname:e1 ACE_COLON ACE_IDENT:e2
- {: RESULT.str_val = new String(e1.str_val + ":" + e2.str_val); :}
- |
- pathname:e1 ACE_COLON ACE_IDENT:e2 ACE_LPAREN ACE_RPAREN
- {: RESULT.str_val = new String(e1.str_val + ":" + e2.str_val); :}
- ;
-
-type ::= ACE_MODULE_T ACE_STAR
- |
- ACE_SVC_OBJ_T ACE_STAR
- {: RESULT.str_val = new String("Service Object"); :}
- |
- ACE_STREAM_T ACE_STAR
- ;
-
-parameters_opt ::= ACE_STRING:e
- {: RESULT.str_val = new String(e.str_val); :}
- |
- ;
-
-pathname ::= ACE_PATHNAME:e
- {: RESULT.str_val = new String(e.str_val); :}
- |
- ACE_IDENT:e
- {: RESULT.str_val = new String(e.str_val); :}
- ;
-
-
-
diff --git a/java/src/Yylex.lex b/java/src/Yylex.lex
deleted file mode 100644
index fc41453fbad..00000000000
--- a/java/src/Yylex.lex
+++ /dev/null
@@ -1,78 +0,0 @@
-package JACE.ServiceConfigurator;
-
-import java.io.*;
-import JACE.OS.*;
-import java_cup.runtime.*;
-
-// This was written for JLex version 1.2
-
-%%
-
-// Return a java_cup.runtime.token instead of a Yytoken from yylex()
-%type java_cup.runtime.token
-%{
- // Used to assemble the parameter string for a service
- private String params;
-%}
-
-%eofval{
- return new java_cup.runtime.token (sym.EOF);
-%eofval}
-
-%line
-
-%state COMMENT
-%state PARAMS
-
-ALPHA=[A-Za-z_]
-DIGIT=[0-9]
-WHITE_SPACE=[\ \t\b\012]
-PATHNAME=[\.\\\/A-Za-z_\-0-9]
-NEWLINE=\n
-OTHER=.
-
-%%
-
-<YYINITIAL> dynamic {return new java_cup.runtime.token (sym.ACE_DYNAMIC); }
-<YYINITIAL> static { return new java_cup.runtime.token (sym.ACE_STATIC); }
-<YYINITIAL> suspend { return new java_cup.runtime.token (sym.ACE_SUSPEND); }
-<YYINITIAL> resume { return new java_cup.runtime.token (sym.ACE_RESUME); }
-<YYINITIAL> remove { return new java_cup.runtime.token (sym.ACE_REMOVE); }
-<YYINITIAL> stream { return new java_cup.runtime.token (sym.ACE_USTREAM); }
-<YYINITIAL> Module { return new java_cup.runtime.token (sym.ACE_MODULE_T); }
-<YYINITIAL> Service_Object { return new java_cup.runtime.token (sym.ACE_SVC_OBJ_T); }
-<YYINITIAL> STREAM { return new java_cup.runtime.token (sym.ACE_STREAM_T); }
-<YYINITIAL> active { return new java_cup.runtime.token (sym.ACE_ACTIVE); }
-<YYINITIAL> inactive { return new java_cup.runtime.token (sym.ACE_INACTIVE); }
-<YYINITIAL> ":" { return new java_cup.runtime.token (sym.ACE_COLON); }
-<YYINITIAL> \" {
- yybegin(PARAMS);
- params = new String();
-}
-<YYINITIAL> "#" { yybegin(COMMENT); }
-<YYINITIAL> "*" { return new java_cup.runtime.token (sym.ACE_STAR); }
-<YYINITIAL> "(" { return new java_cup.runtime.token (sym.ACE_LPAREN); }
-<YYINITIAL> ")" { return new java_cup.runtime.token (sym.ACE_RPAREN); }
-<YYINITIAL> "{" { return new java_cup.runtime.token (sym.ACE_LBRACE); }
-<YYINITIAL> "}" { return new java_cup.runtime.token (sym.ACE_RBRACE); }
-<YYINITIAL> {WHITE_SPACE}* { /* Skip all white space */ }
-<YYINITIAL> {ALPHA}({ALPHA}|{DIGIT}|_)* {
- return new java_cup.runtime.str_token (sym.ACE_IDENT, yytext());
-}
-<YYINITIAL> {PATHNAME}* {
- return new java_cup.runtime.str_token (sym.ACE_PATHNAME, yytext());
-}
-<YYINITIAL> {NEWLINE} { /* Empty */ }
-<YYINITIAL> {OTHER} {
- ACE.ERROR ("Unknown text, line " + (yyline + 1) + ": \"" + yytext() + "\"");
- return new java_cup.runtime.str_token (sym.error);
-}
-<PARAMS> [\"\n] {
- yybegin(YYINITIAL);
- return new java_cup.runtime.str_token (sym.ACE_STRING, params);
-}
-<PARAMS> . {
- params = params + yytext();
-}
-<COMMENT> {NEWLINE} { yybegin(YYINITIAL); }
-<COMMENT> {OTHER} { /* Skip everything on a comment line */ }