summaryrefslogtreecommitdiff
path: root/lib/Automake/Parser/ParserTable.pm
diff options
context:
space:
mode:
authorVishal Gupta <vishalgupta7972@gmail.com>2018-07-06 15:59:54 +0530
committerVishal Gupta <vishalgupta7972@gmail.com>2018-07-06 15:59:54 +0530
commitaf9641edc78265d69a488869a59bc2c38c00d792 (patch)
tree4e7a110b6ad1c9e7c779c576db78d8e5df193a60 /lib/Automake/Parser/ParserTable.pm
parenta7ac93842cf5633d23263271856b7eadb6d0e3fa (diff)
downloadautomake-af9641edc78265d69a488869a59bc2c38c00d792.tar.gz
Updated parser to tokenize and parse line by line.
Lexer tokenizes the current line whenever it is called by parser. "end" token is returned when EOF is encountered. Currently assumes that newline is their before EOF.
Diffstat (limited to 'lib/Automake/Parser/ParserTable.pm')
-rw-r--r--lib/Automake/Parser/ParserTable.pm32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/Automake/Parser/ParserTable.pm b/lib/Automake/Parser/ParserTable.pm
index 13b607821..1647af076 100644
--- a/lib/Automake/Parser/ParserTable.pm
+++ b/lib/Automake/Parser/ParserTable.pm
@@ -9,21 +9,21 @@ our @Export=qw(@table $accept);
our $accept=17;
our @table=(
- {stmts => 5, makerule => 8, comment => 2, lhs => 11, input => 4, ifblock => 10, stmt => 6, optionlist => 13, automakerule => 7, conditional => 9, if => 3, commentlist => 12, value => 1},
- {reduce => [1, \&lhs], ':' => 14, '_' => 15},
+ {makerule => 8, stmt => 6, value => 1, input => 4, if => 3, automakerule => 7, ifblock => 10, comment => 2, optionlist => 13, lhs => 11, stmts => 5, conditional => 9, commentlist => 12},
+ {'_' => 15, reduce => [1, \&lhs], ':' => 14},
{reduce => [1, \&commentlist]},
{value => 16},
{end => 17},
- {makerule => 8, comment => 2, lhs => 11, ifblock => 10, stmt => 18, optionlist => 13, automakerule => 7, conditional => 9, if => 3, reduce => [1, \&input], commentlist => 12, value => 1},
+ {optionlist => 13, comment => 2, commentlist => 12, lhs => 11, conditional => 9, automakerule => 7, ifblock => 10, reduce => [1, \&input], if => 3, stmt => 18, makerule => 8, value => 1},
{newline => 19},
{reduce => [1, \&stmt]},
{reduce => [1, \&stmt]},
{reduce => [1, \&stmt]},
- {optionalelse => 21, reduce => [0, \&optionalelse], else => 20},
+ {else => 20, reduce => [0, \&optionalelse], optionalelse => 21},
{'+' => 23, '=' => 22},
{comment => 24, reduce => [1, \&stmt]},
- {PYTHON => 30, SCRIPTS => 32, JAVA => 31, LTLIBRARIES => 28, DATA => 33, value => 25, HEADERS => 34, TEXINFOS => 36, primaries => 37, LIBRARIES => 27, PROGRAMS => 26, LISP => 29, MASN => 35},
- {rhs => 39, rhsval => 38},
+ {primaries => 37, value => 25, PROGRAMS => 26, MASN => 35, TEXINFOS => 36, LIBRARIES => 27, HEADERS => 34, SCRIPTS => 32, DATA => 33, LTLIBRARIES => 28, LISP => 29, JAVA => 31, PYTHON => 30},
+ {rhsval => 38, rhs => 39},
{reduce => [2, \&optionlist]},
{newline => 40},
{},
@@ -49,21 +49,21 @@ our @table=(
{reduce => [2, \&lhs]},
{reduce => [1, \&rhs]},
{reduce => [3, \&makerule], rhsval => 48},
- {lhs => 11, ifblock => 10, stmts => 49, makerule => 8, comment => 2, conditional => 9, if => 3, commentlist => 12, value => 1, stmt => 6, optionlist => 13, automakerule => 7},
+ {automakerule => 7, ifblock => 10, comment => 2, optionlist => 13, commentlist => 12, lhs => 11, stmts => 49, conditional => 9, stmt => 6, makerule => 8, value => 1, if => 3},
{reduce => [3, \&stmts]},
- {comment => 2, stmts => 50, makerule => 8, ifblock => 10, lhs => 11, automakerule => 7, optionlist => 13, stmt => 6, value => 1, commentlist => 12, if => 3, conditional => 9},
- {reduce => [0, \&optionalcond], value => 51, optionalcond => 52},
- {optionalcomments => 53, comment => 2, commentlist => 54, reduce => [0, \&optionalcomments]},
- {reduce => [1, \&optionalrhs], rhsval => 48},
- {rhs => 45, optionalrhs => 55, reduce => [0, \&optionalrhs], rhsval => 38},
+ {if => 3, value => 1, stmt => 6, makerule => 8, commentlist => 12, lhs => 11, stmts => 50, conditional => 9, comment => 2, optionlist => 13, ifblock => 10, automakerule => 7},
+ {value => 51, optionalcond => 52, reduce => [0, \&optionalcond]},
+ {comment => 2, reduce => [0, \&optionalcomments], optionalcomments => 53, commentlist => 54},
+ {rhsval => 48, reduce => [1, \&optionalrhs]},
+ {optionalrhs => 55, rhsval => 38, reduce => [0, \&optionalrhs], rhs => 45},
{reduce => [3, \&optionlist]},
{reduce => [2, \&rhs]},
- {reduce => [4, \&ifblock], value => 1, commentlist => 12, if => 3, conditional => 9, automakerule => 7, optionlist => 13, stmt => 18, ifblock => 10, lhs => 11, comment => 2, makerule => 8},
- {comment => 2, makerule => 8, ifblock => 10, lhs => 11, automakerule => 7, optionlist => 13, stmt => 18, reduce => [3, \&optionalelse], value => 1, commentlist => 12, if => 3, conditional => 9},
+ {if => 3, reduce => [4, \&ifblock], value => 1, stmt => 18, makerule => 8, commentlist => 12, conditional => 9, lhs => 11, optionlist => 13, comment => 2, ifblock => 10, automakerule => 7},
+ {value => 1, stmt => 18, makerule => 8, if => 3, reduce => [3, \&optionalelse], ifblock => 10, automakerule => 7, commentlist => 12, conditional => 9, lhs => 11, optionlist => 13, comment => 2},
{reduce => [1, \&optionalcond]},
{reduce => [4, \&conditional]},
{reduce => [4, \&automakerule]},
- {reduce => [1, \&optionalcomments], comment => 24},
- {reduce => [0, \&optionalcomments], commentlist => 54, comment => 2, optionalcomments => 56},
+ {comment => 24, reduce => [1, \&optionalcomments]},
+ {comment => 2, reduce => [0, \&optionalcomments], optionalcomments => 56, commentlist => 54},
{reduce => [5, \&automakerule]}
); \ No newline at end of file