aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/lscript/lscript_compile/indra.l
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/lscript/lscript_compile/indra.l')
-rw-r--r--linden/indra/lscript/lscript_compile/indra.l24
1 files changed, 17 insertions, 7 deletions
diff --git a/linden/indra/lscript/lscript_compile/indra.l b/linden/indra/lscript/lscript_compile/indra.l
index 584087e..7f4cdc5 100644
--- a/linden/indra/lscript/lscript_compile/indra.l
+++ b/linden/indra/lscript/lscript_compile/indra.l
@@ -53,9 +53,16 @@ void parse_string();
53#define ECHO do { } while (0) 53#define ECHO do { } while (0)
54 54
55#if defined(__cplusplus) 55#if defined(__cplusplus)
56extern "C" { int yylex( void ); } 56extern "C" {
57extern "C" { int yyparse( void ); } 57#endif
58extern "C" { int yyerror(const char *fmt, ...); } 58int yyerror(const char *fmt, ...);
59int yylex( void );
60// Windows defines this in indra.y.hpp, which is included above, and defines it differently.
61#ifndef LL_WINDOWS
62int yyparse( void );
63#endif
64#if defined(__cplusplus)
65}
59#endif 66#endif
60 67
61%} 68%}
@@ -722,9 +729,6 @@ L?\"(\\.|[^\\"])*\" { parse_string(); count(); return(STRING_CONSTANT); }
722LLScriptAllocationManager *gAllocationManager; 729LLScriptAllocationManager *gAllocationManager;
723LLScriptScript *gScriptp; 730LLScriptScript *gScriptp;
724 731
725// Prototype for the yacc parser entry point
726int yyparse(void);
727
728int yyerror(const char *fmt, ...) 732int yyerror(const char *fmt, ...)
729{ 733{
730 gErrorToText.writeError(yyout, gLine, gColumn, LSERROR_SYNTAX_ERROR); 734 gErrorToText.writeError(yyout, gLine, gColumn, LSERROR_SYNTAX_ERROR);
@@ -760,7 +764,13 @@ BOOL lscript_compile(const char* src_filename, const char* dst_filename,
760 764
761 yyrestart(yyin); 765 yyrestart(yyin);
762 766
763 b_parse_ok = !yyparse(); 767// TODO - Try to fix this, but for now, no compiling LSL for Windows in SL.
768// Actually, this seems to not actually be needed anymore?
769// I thought it was needed to support ancient pre Mono LSL scripts, which only work in SL anyway, but they still work fine. Perhaps SL fixed it server side?
770// If that's the case, we don't need any of this stuff.
771#ifndef LL_WINDOWS
772// b_parse_ok = !yyparse();
773#endif
764 774
765 if (b_parse_ok) 775 if (b_parse_ok)
766 { 776 {